YEAH, hitting non involved NPCs is a huge annoyance. I wish a talk down or surrender option was available to avoid situations in which a non initially hostile NPC you don't want to fight tries to engage you.
"You either die the hero or live to see yourself brought back in the sequel as an angsty magical terrorist." -Serious brownie points if you get the character to whom I am referring.-