Some funkiness with function scope and walking the AST