Add variables to scope before evaluating them

Variables that were not being hoisted inside of objects were evaluating
their expression before introducing the variable into scope, meaning
that if the expression referred to the variable it would report that it
could not find it rather than reporting that it was not yet defined.
This is tested by provoking the error and catching only the appropriate
packet.