Fix track limits when detecting collisions

One-off error caused and IndexError when trying to access a location out
of the the track.