Fix bug where pathfinder would try to look outside dungeon