Directly replace the dict holding assigned variables

This seems to fix the scoping issues where local variables are cleared after {usecontent}