Edit: somehow missed alterom’s reply - they explain it much better than my question above does.
I wrote a longer replay to alterom but it looks buried for some reason.
Well, now you are double counting the end values of the ranges. In your example 1 is included in both 0-1 and 1-2.