[contenteditable input] Guard against wrapped or replaced nodes in patchDisplay