cloneNode shouldn't check ownerDocument when cloning a document

Fixes #833.