Ensures that the keys are ordered according to their associated value.