The loop is not selecting positions which start before the region, but end inside or after the region.
For example, position `[5, 10]` with region `[7, 20]`.