@Override
    public List<ValidationEvent> validate(Model model) {
        List<ValidationEvent> events = new ArrayList<>();
        for (MemberShape member : model.getMemberShapesWithTrait(XmlFlattenedTrait.class)) {
            // Don't emit the event if they're being explicit about the xmlName on this member
            if (member.hasTrait(XmlNameTrait.ID)) {
                continue;
            }

            Shape target = model.expectShape(member.getTarget());
            if (target instanceof ListShape) {
                ListShape targetList = (ListShape) target;
                validateMemberTargetingList(member, targetList, events);
            }
        }
        return events;
    }
Validates that xmlFlattened members aren't unintentionally ignoring the
xmlName of their targets.
smithy-model/src/main/java/software/amazon/smithy/model/validation/validators/XmlFlattenedTraitValidator.java