getRangeEnd() should be compared here. size() is always tested.