Corrects dependency list (contained invalid pkgs)