Validate indices when inserting a new range

This commit ensures that the following condition is true for all
inserted intervals: `minIndex < startIndex <= endIndex < maxIndex`
0.4.0