bugfix: closures can create variables in outer scope