Fixed errors with generated code for $rangeTo function.