private List<ScopedAttributeSelector.Assertion> parseScopedAssertions() {
        List<ScopedAttributeSelector.Assertion> assertions = new ArrayList<>();
        assertions.add(parseScopedAssertion());
        ws();

        while (peek() == '&') {
            expect('&');
            expect('&');
            ws();
            assertions.add(parseScopedAssertion());
        }

        expect(']');
        return assertions;
    }
Filter out unnecessary identity selectors when creating the finalized AST to evaluate selectors.
smithy-model/src/main/java/software/amazon/smithy/model/selector/SelectorParser.java