Fix documents.importNode loops.