Fix bug in Range comparisons when comparing to excluded-end Range
#35776

owst wants to merge owst:fix-range-comparisons-with-excluded-end-range into rails:master

We do not currently have an analysis of these two commits