private static boolean hasChildWithTagName(Element element, String childName) {
        for (var child : XML.getChildren(element)) {
            if (child.getTagName().equals(childName))
                return true;
        }

        return false;
    }
Called on each element which is selected by matching some override condition
config-application-package/src/main/java/com/yahoo/config/application/OverrideProcessor.java