Only need to look up the immediate parent for the same-name special case. fixes #1733
-(x*y)
AST_Node.optimize()