Alright, last night I got into a fight with my script cause it didn't seem to be working right, and now after much tinkering I still can't straighten it out. The part in question is this:
When enemies get within 300px of the layout border, they're told to go back. This seems to work... intermittently... and apparently when the condition is true for ALL enemies at once. I thought a For Each loop would solve this, but seems not. In my attempts to rectify it, I've tried moving the For Each into every which place on the chain and breaking up the events into separate blocks. Probably other things too that I don't remember.
What gives? If this looks sound, perhaps something else is causing the AI to misbehave.