Fix performance of FindClosestRegisteredTrack().

This patch significantly speeds up simulation of high energy events.