AST: improved handling of new