MAX_NESTING

private const val MAX_NESTING: Int = 64

A hard stop on nesting. This walk spends several frames per level — where the contentDeepToString it replaced spent one — and it runs on the game thread, so depth has to be bounded somewhere. The chain is the ancestor list, so its size IS the depth; no counter to thread through.