If the cooldown of the ability, by any chance, happens to reset and be cast within the timeframe of the spell already active, it will remove the effects early. It's improbable, but can done.
Ouch, an issue I need to look upon then. I think this is tied due to how Dynamic Indexing and ability addition works., which can be considered an inherent issue with Warcraft III ability add/removal. Theoretically, having duration above both states guaranteed a safety net, but I guess I need to account that the duration being lower than both states time as well?
To better explain this, I presume this logic is the case of the issue:
Cast 1 --> Start Fade -->
Fade Ends and Ability Added --> Cast 2 around the Ability Added phase --> Cast 2 instance fade starts -->
cast 2 instance fade ends and ability add -->
cast 1 ability removal
The bolded sections are the key to the issue. I need to consider specific ways to know whether the ability is to be discarded or not when timer ends, but that is O(n) operation to scan over all remaining instance if this caster is registered within any of those instances and cancel ability removal. In theory, it can be slightly optimized if the spell is designed as a linked list, opposed to a dynamic indexing.
This issue might exist in other spells across the spell section that works by adding-removing extra abilities and relied on timers without safeguards like this spell, now that I think about it. I'll do a fix for the issue.
EDIT:
On second thought, will rising the cooldown sufficient to blast the issue away from plain sight? Alternatively, I think this is an interesting material to discuss, in regards to 'added ability' aspect of a spell section material.
EDIT:
On third thought, never mind. I'd just go with the simple O(n) iteration over the index. Shouldn't be that costly, I think.
Another approach is to use dummy buffing abilities instead, which is not my preference.