trq-1536 Sort nodes while adding them into the linked list.