ranges: use a hack around so when merging ranges of different types