Make it a law that someone who shoots another person unjustifiably and who hasn't gone through a training course gets the boom lowered on them.
If the shooting is justifiable, then hey, good job, gun owner. You did it right.
If the shooting is not justifiable, then the question is, did the gun owner do what was reasonably prudent to ensure that such a mistake was not made? If the answer is "no", then this is a person I sure wouldn't want to defend.
With gun ownership, especially for personal protection, comes responsibility to use the tool wisely. If one doesn't, then you take the consequences. Why should we want to defend a person who has done something horribly wrong just because he is a gun owner? That makes no sense.