It is not. The idea is not to provide political cover for violent escalation by the establishment. Now, if that escalation nevertheless occurs, one response is to make lemonade out of those lemons, but it's not the goal of nonviolent protest.
“Nonviolence is a powerful and just weapon, which cuts without wounding and ennobles the man who wields it. It is a sword that heals.”
“Nonviolence is absolute commitment to the way of love. Love is not emotional bash; it is not empty sentimentalism. It is the active outpouring of one’s whole being into the being of another.”
The point is to sway the very opponent who is harming you, to convince them that hurting you is wrong. It takes great strategy, tactics, and courage. The point is not to be a martyr, it is to create change that makes a difference.