a hack to fix a problem caused by multi-matching in graph rewriting