rewrite rules: analysis: attributes can define variables in match, fix variable def in node defined by relation