#9710 NullPointerException in Thread Pathfinder

Applying locks to path finder that ensure that the path finding does
not cause any unexpected exceptions due to synchronization issues