XWIKI-10688: When XWiki is configured for ultra short URLs, links to the homepage become links to the current document
Fixed.

(cherry picked from commit 953efa960f9eab8ca345126c2a9a3bc2e69dff52)