Fix "robust" sorting to be really robust.