Fix issue where slicing past the end of a Range results in an incorrect result. This is a reworked version of pull #58