Bugfixes to bounds inference and sliding window.

There's a remaining problem with inferring storage bounds taking forever.
To trigger, run interpolate app with HL_TARGET=ptx.

Sliding window was doing completely the wrong thing when sliding backwards.