This involved fixing how the ScopeResolver handles local bindings. I probably want to rewrite much of that code.