And I take the opportunity to nudge them and ask, "They did a bad thing. Does that mean they're always bad? Can they make things better? Should we forgive them? How do we know when to forgive them?" (not in a single tirade; these are just questions I drop over time.)
Because, in anticipation of the fact that they're definitely going to fuck up along the way, I want them to learn that mistakes and failures and even doing bad things don't make them irrevocably bad - that ultimately, the most important thing is making amends / trying again / etc. That your worst decision is not the sum total of who you are.
I don't see why I should try so hard to teach that to my kid, and then "disavow" friends who may have fucked up.