Summary:
Units that is forcebly removed( UTIL_Remove(),RemoveSelf(), 5s after death delete ) and have modifiers on them doesn't correctly remove these modifiers (removed message don't show up when dota_modifier_debug is enabled (server-side only); they does not decrement ref. counter of parent ability.)

Repro:
Set convar dota_modifier_debug to 1.
Create custom spell that uses CreateModifierThinker() with modifier that removes parent in OnIntervalThink() function.

Result:
Unit is removed no message from server that buff is removed(which means it skips some stages), ability says that it has 1 modifier referencing it.

Expected result:
Modifier is removed by all rules like RemoveModifierByName().

This bug affects Rubick, i.e use Wild Axes, steal new ability, steal Wild Axes again - now you have 2 Wild Axes entities.


Few examples of DOTA abilities that show this bug:
juggernaut_healing_ward: modifier_juggernaut_healing_ward_aura is removed only on client.
[OnEntityKilled] Classname:npc_dota_base_additive; UnitName:npc_dota_juggernaut_healing_ward; Owner ID:0; Attacker Classname:npc_dota_creep_lane; Attacker ID:-1;
S [68.70] Removing buff 'modifier_juggernaut_healing_ward_heal' index: 20 to 'npc_dota_hero_rubick'.
C [68.73] Removing buff 'modifier_juggernaut_healing_ward_heal' index: 20 to 'npc_dota_hero_rubick'.
C [69.77] Removing buff 'modifier_juggernaut_healing_ward_aura' index: 1 to ''.

beastmaster_wild_axes: modifier_beastmaster_axe_invulnerable is removed only on client.
C [171.27] Refreshing buff 'modifier_beastmaster_axe_stack_counter' to 'npc_dota_creep_lane'. - Stack Count: 2
S [171.27] Removing buff 'modifier_beastmaster_axe_stack_counter' index: 2 to 'npc_dota_creep_lane'.
C [171.31] Removing buff 'modifier_beastmaster_axe_stack_counter' index: 2 to 'npc_dota_creep_lane'.
S [172.17] Removing buff 'modifier_beastmaster_wild_axes' index: 25 to 'npc_dota_hero_rubick'.
C [172.21] Removing buff 'modifier_beastmaster_axe_invulnerable' index: 1 to ''.
C [172.21] Removing buff 'modifier_beastmaster_axe_invulnerable' index: 1 to ''.
C [172.21] Removing buff 'modifier_beastmaster_axe_invulnerable' index: 1 to ''.
C [172.21] Removing buff 'modifier_beastmaster_axe_invulnerable' index: 1 to ''.
C [172.21] Removing buff 'modifier_beastmaster_wild_axes' index: 25 to 'npc_dota_hero_rubick'.

rattletrap_rocket_flare: modifier_clockwerk_rocket_flare_thinker is removed only on client.
C [327.34] Removing buff 'modifier_clockwerk_rocket_flare_thinker' index: 1 to ''.