Use an actual dict for the scope environment

This makes the environment-sharing thing the REPL does actually work.