Fix infinite loop after a native package installed

When upgrading a tpkg requires installation of a native package
Fix removal of symlinks to directories