There have been many cases in which it is either team shot or all shot Deadmatch and your teammate shoots a 1 bounce or something else and it hits you. Or if there is a troll on your team that is attacking you My suggestion is that when you attack an ally, You loose hp instead of you. So 3 members are stacked and a troll decides to use a nuke on himself, Instead of all of your team taking 80 damage, Just he takes 240 damage. The damage you deal to teammates is transferred to you.
But think.about it, it's not exactly fair on those people who don't want to shoot my team mates but still do. You realise in most games I've been in, there was atleast one person who shot his own team.