Update range overflow detection for direct range iterators

Instead of creating a range to perform the overflow check, directly perform it
with a helper function that the original range overflow check now uses.