Fixed issue in UT scenarios where the framework has already installed packages.