Exceptions in Replace Child

Hello
Can anyone explain this exception in replace-child DOM “If the replacement of oldchild by newchild would lead to a cycle, that is if newchild is an ancestor of the node”

Thanks