Fix #3789: remove relative parts of the modulepath