Fixed a bug where piping Range/Repeat with non-monotonic operators (like Where) resulted in wrong code.