Well, the group we've put together now at my gaming club is a very good one, so we don't get random TKers.
However, there have been other times . . .
About a year ago our usual DM was away, so one of the players was running a D&D one-off. He did a good job of it, too, especially since players kept leaving and joining throughout the session (had a total of 9 players over the game, though there were never more than 6 playing at once).
As usual with one-off fill-in games, there wasn't much party cohesion. There was the usual slight fudging to explain why each of our characters was willing to go on a dangerous combat-filled mission with a bunch of total strangers, which everyone went along with. As things turned out, all the party conflicts were good-humoured, and everyone did their best (with varying effectiveness) to help out the group - with one exception.
One of the players was playing a sorcerer. He'd already caused a certain amount of trouble by firing a lightning bolt down a tunnel where the party was fighting a huge earth elemental. The DM helped him out by suggesting that he aim over the heads of his fellow party members, but the player seemed to have difficulty grasping why the rest of us did not appreciate him firing area-effect spells into the middle of a melee.
The final battle of the adventure pitted us against a pair of modified babaus. Although there were six of us, all level 6, most of the characters weren't tuned for combat, and things quickly got dangerous. After seven rounds, the party monk was on the ground at -6 HP and stable, and everyone else (apart from the sorcerer) was wounded to some degree and engaged in melee around the babaus. The sorcerer's turn came up.
Sorcerer: "I cast lightning bolt."
DM: "You can't cast it from your position without hitting Elwin." (The party duskblade; me.)
Sorcerer: "Oh, wait. If I step to here, the babaus are in a line in front of me, right? I cast it from there."
DM: "Okay . . . but now the monk is on the ground in front of you. You'll hit him as well."
Sorcerer: "Yeah, I do it."
DM: ". . . Roll caster level against their SR."
The babaus, being immune to electricity, took a bath in the lightning bolt and laughed. The monk died horribly.
We eventually scraped a win with several more people on negative HP but no further deaths. Once we'd healed up, I had to figure out what to do about the sorcerer. What do you do when one of your supposed allies has killed another party member and doesn't seem to realise that there's anything wrong with it?
We were in an uncharted dungeon in the wilderness miles from anywhere, so we were on our own to make the decision. The options I was considering were:
a) Boot him from the group. Pros: no more threat of him fragging us. Cons: would lose his (minimal) firepower, no way to know what he would do once ejected.
b) Warn him not to do it again. Pros: would maintain party harmony. Cons: felt like a major underreaction for killing a teammate.
c) Kill him. Pros: satisfying retribution for his Darwin-Award-level stupidity, would get to keep his stuff. Cons: possibly slightly evil.
My character was Lawful Neutral and is a professional adventurer/soldier. I went for warning him in the end, telling him that if he hit any of us with his spells again, he'd be dead by the end of the battle. I was severely tempted by c), though.
Out-of-character, the problem was simply that the sorcerer's player was an idiot incapable of grasping the concept of teamwork. One player suggested a Helm of Opposite Alignment, but the only thing that would have helped would be if we'd managed to find a Helm of Opposite Mental Capacity. In real-life, I mean, not in game.
In the end the problem was solved when the player didn't show up for the next session. Several months later, though, the same guy tried to join my Red Hand of Doom campaign, when I was DMing. He didn't get in.