If things escalate to the point where nuclear weapons get used, that probably implies enough of a breakdown of order that it doesn't matter what any treaty says.
Also, a country's use of nuclear weapons is a powerful signal that it's willing to use them again, giving it a powerful negotiating advantage.
India vs. Pakistan: the nuclear option is dangerously close, and nobody seems to want to prevent it
http://qz.com/541502/a-nuclear-war-between-india-and-pakistan-is-a-very-real-possibility/