It looks like `opt_doc` is always defined, since both `cloneNode` and `importNode` pass one.