search_module: fix context id identification
search_module: fix context id identification

eg, in a page with this layout:

<div id="foo">
  <h2 id="bar">
  <p>token</p>
</div>

Searching for token should link to #bar, not #foo.

This was a regression from the C port.

hotdoc/hotdoc,hotdoc/hotdoc,hotdoc/hotdoc,hotdoc/hotdoc,hotdoc/hotdoc,hotdoc/hotdoc