The question is, when should we draw the line in showing support for our friend and preserving our sanity to avoid spending time with people that annoy us?
It's easy to get caught up in "courtesy" -- especially if you were raised with some semblance of manners. We want to, after all, try and keep peace with the people we cherish. But I think it's ok to say "no" in your own way. Why fake the funk? If anything, it's arguably more polite to spend less time with them so you don't come off rude when you do see them.
I'm not saying dodge them completely. Going to large parties can certainly mean you won't be forced to talk with them all night. But if it's going to be a group of three? Why not pass?
I find myself in these situations all the time, and with all the Labor Day festivities being planned for the weekend, some friends have also shared stories of events they're not psyched about because of the guest list.
The choice is theirs but in the end, you may have to consider your friend. How close are they? If that's your pal in crime, and it's a pretty mixed group, it's OK to bear it once in a while. You may not know how many of your friends they can't stand.
But in the end, if it's a person that REALLY rubs you the wrong way, and there won't be that many people... Then it's a case by case. I DO know life is too short to put yourself in too many of those uncomfortable situations. So I'd measure it out. But don't force it. You know your threshold.
Think of it this way: the situations you DO bear can serve for great ammo to have a friend pay you back down the road. :-)