Fix crash when waypoint has no neighbours.