Should fix rare failure on assert(N >= k) in kmeans