Prevent potential integer overflows in SortedList's binary search midpoint calculation