The legal system exists to prevent people from using violence to solve their own problems. A very powerful third party arbitrating helps keep things relatively civil.
If you did find a bug, then society needs to patch it. And that's to desirable outcome.
The undesirable outcome is that someone sends a ninja into your house at 3am to manually patch the bug.
What's much more common than either of those is that the bug isn't fixed and it's no big deal.
For example, there's a widely known bug in the definition of "legal tender". It doesn't vary based on the size of payment to be tendered, so in a sense, you're entitled to pay a $10,000 bill in the form of 250,000 quarters unless you've specifically agreed otherwise. Every once in a while someone tries to exploit this (recently: https://www.nytimes.com/2023/10/30/us/coins-lawsuit-payment-...), but judges can and do simply declare the exploit to be in bad faith and make them knock it off. (As any third party arbitrator would do.)
Surprised you don't have something like this[1], at the federal level:
"
...coins are legal tender for payment of amounts which are limited as follows:
not exceeding 20c if 1c and/or 2c coins are offered (these coins have been withdrawn from circulation, but are still legal tender);
not exceeding $5 if any combination of 5c, 10c, 20c and 50c coins are offered; and
not exceeding 10 times the face value of the coin if $1 or $2 coins are offered.
"
It's clean, simple, and effective. And an entity can choose to accept the coins anyway if they wanted to, it just doesn't oblige them to accept them.
Statutory rape is not the same thing as rape. That's why it has a different name. And the "rapist" was a minor too. So far from how you presented the case.