When "ability" field isn't nil "damage_flags" field is ignored.

Example code:
1. Without 'ability' field:
Code:
	local hero = HeroList:GetHero(0)
	local damage = {
		victim = hero,
		attacker = hero,
		damage = 10000,
		damage_type = DAMAGE_TYPE_MAGICAL,
		damage_flags = DOTA_DAMAGE_FLAG_NON_LETHAL,
	}
	ApplyDamage(damage)
Works as intended - hero HP has decreased to 1.

2. With 'ability' field:
Code:
	local hero = HeroList:GetHero(0)
	local damage = {
		victim = hero,
		attacker = hero,
		damage = 10000,
		damage_type = DAMAGE_TYPE_MAGICAL,
		damage_flags = DOTA_DAMAGE_FLAG_NON_LETHAL,
		ability = hero:GetAbilityByIndex(0),
	}
	ApplyDamage(damage)
Hero gets denied.

Edit:
Whoops, DamageFilter was the reason, but there's no way to fix this, we can't check flags of damage...