This looks idiotic but Grasshopper is quirky that way. It’s a VERY IMPORTANT DETAIL… I had to round off the centroids (I used two decimal places) to get Sort Points to behave nicely. See purple groups. 
rectangular_grid_2020Apr3b.gh (30.6 KB)
This looks idiotic but Grasshopper is quirky that way. It’s a VERY IMPORTANT DETAIL… I had to round off the centroids (I used two decimal places) to get Sort Points to behave nicely. See purple groups. 