We can't independently memoize values created within a loop, so this pass flattens scopes within loops. Right now this just flattens the scope away without propagating any dependency (or output) information, follow-ups will extend it to do that.