Fix AST equality checks