Fixes exception when range values not imlementing IComparable were being put into SortedSet.