Kmeans efficient group-by. Check for copies!