WIP - some crazy work on scoping for closure variables