I'm sorry that happened to you and your friend.
But I'm not quite going to give you a free pass, I'm going to give you 'homework'. Work on things to say to her again if you see her, and practice saying it politely (coldly polite is fine).
Feel free to refuse to socialise with her. Sounds like some people would be happy with that. Maybe not the full cut direct but an apologetic "I really don't have anything to say to you, sorry but I have to go floss my plants."
What DeeTee suggests is good, or other things similar. But you will need to practice them, either to a mirror, or to a friend, so that when you are confronted with 'K', then it will come out smoothly, and you won't have to fumble to remember what you were going to say.
I agree that this is the way to go now, but I believe, unfortunately, the outburst had to happen in order for this technique to be at all effective. K ignored clear avoidance signs in the past, and she sounds so obtuse (or drama-queenly) that even this approach might not have worked with her.
Actually, let me make one little adjustment to the above. Scratch "apologetic." Nellop, you have no reason to be deferential to this person. She most certainly isn't respectful of your feelings, and her "joke" (ugh) at O's mother's expense shows that she considers any and everyone fair game. I'd go with "cold." Leave no doubt that you have no intention of socializing with her. Some people need a studded clue-by-four.