Revert code cleanup by ractoc for the time being.
Add check for duplicate base packages.