chain

private val chain: MutableSet<Any>

The containers between the root and the current element, by IDENTITY: equals/hashCode are caller code that recurses over the structure being walked, so equality would blow the stack this protects.