Add a missing check for inverse ranges in splitRange() and corresponding tests for inverse ranges and 0-length-ranges.