This idea comes from this thread: https://sourceware.org/pipermail/gdb-patches/2023-August/201655.html The idea is that if a DIE refers to itself via a chain of DW_AT_specification (or the other ways a DIE can refer to another), then dwarflint ought to warn, as recursion like this is never valid.
libdw dwarf_attr_integrate does prevent cycles by limiting the chain of DW_AT_abstract_origin and DW_AT_specification to 16 (arbitrary number). On a different level, DW_AT_import can also create cycles (or rather infinite imports). __libdw_visit_scopes does contain some cycle detection.