Change ordering of actions around
Merge branch 'bugfix.context-rename'

We want to rename context after we have updated the dictionary from the
user supplied variables, in case the user provides a key named context.

This isn't recommended because Mako has an internal variable named
context, however at least now context will get renamed even if the user
passes it in.