`search` was never declared, so any link whose entire path is `/index.html`
or `/index.php` (the path is empty once the suffix is stripped) threw a
ReferenceError whenever the hostname had a subdomain or an unknown SLD.
`pathSegments.length` is what the check was reaching for.
With that fixed, those links reached a second bug: `indexSuffix` was
appended after the query and hash, so `x.io/index.html?q=1` decoded to
`x.io?q=1/index.html`. It is now spliced back in before the first `?`/`#`.