Fixed bug in the range checker pass based on Mike's test case.