Fix for bug 842799 (|Document.prototype instanceof Node| inside <script> returns false). r=bz.