block breaking robots first scan for valid targets before attempting to ...

...pathfind

This does not fix #2306 completely, but at least allows robots not to get stuck in normal farm operation, i.e. they won't get stuck after clearing the farm.