Fixed issue where sorted-list was iterating over multiple insertion cases