Prevented impossible path searches from crashing the game.