private static Optional<String> mostSpecificAttribute(Element tag, String attributeName) {
        return mostSpecificAttribute(tag, attributeName, true);
    }
Returns the given attribute from the given tag or its closest ancestor with the attribute.
config-model-api/src/main/java/com/yahoo/config/application/api/xml/DeploymentSpecXmlReader.java