Edit: Fixed!
I have an ability where a unit casts a spell, turns invisible and all of the enemy (Player 12) units around him go to sleep (basically, he distracts the enemies so he can get out of danger). I got the code from Elil a year or so ago and this code works perfectly for another spell, so I suspect it's a problem with sleep (or maybe invisibility?). Also, this trigger used to work but has stopped working in the last year of WC3 patches.
I've tested several things to work correctly... the trigger activates correctly and it even goes through the loop the correct number of times.
The spell is based off of the Dreadlord's Sleep spell and has the same Order String.
If you want to check out the problem, I've uploaded the map (edit: removed, problem fixed!). The hero is the pirate hero and the spell is Cunning Distraction. The trigger is in the Trigger Spells and Items folder in the triggers. A similar spell that works correctly is Form of Wind on the spellbreaker hero. The map has a bunch of Tomes of Power in the dropoff area to let you get enough levels to test spells without fear of dying.
Thanks for the help! This is (hopefully!) the last tough bug before I can make a peaceful retirement from WC3 mapping.