It also depends on how tightly the particular dog was line bred.
Say I had a bitch who I want to breed.
When looking at the stud dog's pedigree I want to see what dogs are most influential. How many times a particular dog is in his pedigree, if any of those dogs are in my bitch's pedigree. What those dogs temperaments and health testing looked like, and what kind of things they were known to produce or bring into the line.
It's not really a cut and dried deal. I'd have to look back, but there was a sheltie breeder who harped on "tail male" or "tail female" lines meaning and top and bottom lines of your pedigree often held the most influential dogs, and the dogs who appeared more towards the middle weren't quite as prolific. The idea being, that if your bitch has a dog towards the middle that you love, breed to a male who has the same dog in their pedigree and can bring that to the outside.
I don't know how much sense that makes without a visual.
I spend my time studying dogs I like. What I like about them, what they throw in litters, temperaments, working ability, biddability, health, etc. Then I would choose a stud based on what I like about HIM as well as the other dogs in the pedigree. You line breed to keep what you like, you outcross to get what you want and bring it in.
Basically, I wouldn't let a single dog in a pedigree sway me away from breeding to a particular stud, unless the dog I dislike is in there maybe 3 times. And then, I'd hope my research would be able to pick out what I didn't like about the dog, and how much of that quality had been passed down to the stud, then I still might consider him for an outcross breeding, and take the offspring of that litter back to more tightly linebred stuff that I liked.