Fixed closures issue

Added support for closures
Storing this in the `currentScope` doesn't do anything, since the only place it gets checked is non-variable and non-expression function calls (see below). I think it should be enough to change the `if (!$name instanceof Expression)` to `if (!$name instanceof Expression && !$name instanceof Variable)`.