expr_creates_var function

Test that a new variable has been created.