Fix issue #186: in some cases an absorbing path could generate
the wrong link in a mounted app.