Well umm... all function in loops work, but here's the thing:
Are you using one dummy to damage all the units? Because sometimes the dummy just can't take nanosecond-apart orders and so won't damage all units...
As a measure of safety, what I always do, is create - in the loop - the dummy, order to damage, then remove (add expiration timer usually).
That way each enemy gets his own little dummy to damage him
If the problem is something else, I'd be checking the hive later tonight i think..
so just let me know