Improved reinstallation routines. Before the patch, only the root
package was reinstalled