Fix what looks like a bug in bounding box tracking for pathfinding.