@Override
    public void visitDomElement(DomElement element) {
      element.acceptChildren(this);
      if (!declarationBeforeComponentFound && element instanceof Component checkedComponent
          && isFirstDuplicateDeclaration(checkedComponent)) {
        declarationBeforeComponentFound = true;
      }
    }
@Override
    public void visitDomElement(DomElement element)