Fix slowdown when AI going to blocked tile

A* was repeatedly invoked since there was
no valid path to the goal, if the goal itself
is blocked e.g. is a wall or has an obstacle