Fixes #5935.  Stop searching before getting to the HTMLDocument element.
Fixes #5935.  Stop searching before getting to the HTMLDocument element.

git-svn-id: 674a2d6b1e32e53f607eb824547723f32280967e@12593 560b804f-0ae3-0310-86f3-f6aa0a117693

redaktor/deliteful