More efficient (stable) sort of lists