When joining with a single range, firstRange would be the same as RangeAt(endIndex - 1) and we would overwrite its offset field before getting its end offset, thus possibly resulting in a wrong joined range size.