Changing `array.keySort()` to put non-matches last