Fix k-means being recomputed after changing lambda