math.ranges: Stopgap fix for math.ranges unit tests. See issues #803, #800, #508.