well that was unusually easy-basically all I did (or you, if you're me)
was change it so that optimized move path returns nil in the case that
the space cannot be found. likewise this solves the problem where it
doesn't leave optimize the loop and locks up. Who's a smart software
designer? you are! yes YOU are!