- download and start jetty+hsqldb package
- create a new wiki
- in the home page of this wiki put a link [[xwiki:Main.WebHome]]
-> generate an local URL instead of an URL leading explicitly to main wiki
The problem is that URL factory assume that the current domain lead to main wiki and all you have to do is to remove the path based wiki part but that may not always be true. Basically it does not explicitly lead to main wiki.
It's not visible if the domain of your URL lead to main wiki (if you click on the link you will end up in the expected document) but if you really were in a subwiki from domain point of view too then the URL will lead to current wiki (i.e. the URL with not explicit wiki is not the main wiki anymore).