Correctly implement {,Total}Ord for types::range