More pathfinding corrections

Corrected mistake in pathfinding: When visiting the same empty tile
inside an area multiple times they were counted as a new empty tile on
each visit. This resulted in valid routes being eliminated and a
situation were sometimes no valid routes were found at all! (which
should never happen obviously).