ensure the correct list of packages is referenced when removing packages

Found this issue when trying to remove some packages.