Simplify StructureMatcher internal code.