Rework Coord nearest_neighbour calc to support circular cases.