Retain the sort order (as published by Phillips)
Retain the sort order (as published by Phillips)

Without this change, a point may miss comparison to its closest mean in one iteration IMHO.
Phillips fixes "c", and keeps the sort order based on the initial mean "c".
Assuming that a point is assigned to mean 1, and the sort yields closest means [1,2,3,4,5]
Mean 3 is closer, and has the priority [3,5,1,2,4] then after switching to the new sort order, mean 5 will not be considered at all in this iteration, and mean 2 will be considered twice.
BaylorCS/baylorml,BaylorCS/baylorml