Cycle detection checks whether attribute dependencies eventually return to an already visited attribute. Without it, dependency ordering can recurse forever, grow its chain, exhaust memory, and terminate Node.js with a fatal error. section 9.3.5
A depth-first visit carries the current dependency chain. Encountering an attribute already in that chain identifies a cycle; returning the repeated path exposes the attributes involved, including self-references. section 9.3.5
Rejecting a cyclic dependency
If attributes 1, 2, and 3 reference one another through their initial values, the diagnostic reports their quoted names as a path and points back to the first attribute. A self-reference forms a one-attribute cycle.

