Fix breaking out of loop when spawning enemy groups

(The only new commit is 6239429)

This fixes the freeze during map loading that @makrohn mentioned on IRC. The bug is present in master, but it feels appropriate to group it in with your other changes here.