A second self-assignment blew the stack
After test.a.b.c = test, a further assignment such as test.a.b.d.e = test ended in a RecursionError, and according to the issue it could crash a Jupyter kernel. _get_dict_or_value() unwrapped nested dicts recursively with no cycle detection.
A cycle guard on the call stack
_get_dict_or_value() records the id() of each dict it is unwrapping and drops it on exit, so shared references are not mistaken for cycles. When it meets a dict already being unwrapped, it raises a descriptive ValueError at once, and tests also cover normal nesting and self-assignment under a new key.