Fixes uniqueness for SimplePatternMatcher