Fix compilation error by reseting AST attributes on factory function
Use `resetAllAttrs` on the minimum necessary tree, the factory tree
Rename variable