Moved closure capturing from VariableAccess and FunctionCall to VariableDecl, removing a lot of duplicate code