Fixing issue with holding and unholding packages where sources are specified

Fixing issue with holding and unholding packages where sources are specified instead of pkgs. #13293