Fixed bug with inserting at the head of sorted lists.