It still seems pretty vindictive.
A more extreme counterexample would be that a case where a person broke into an office and stole a USB stick, kidnapping an employee and shooting a guard on the way out. There's IP theft (federal), kidnapping (federal), and homicide (local). Which should that person not be prosecuted for? How do you choose?
In any case, I'm not an attorney and this appears to be settled law and not really up for debate.
Also you'd need to try to mitigate nonlinearity in punishment somehow. At the very least figure out a way to punish any details like "armed robbery" only once.
Trying to unravel longstanding law is kind of like poking at a piece of code that's been running for 20 years and deciding you can do better. Then realizing that the only way to make it better is to rewrite it from scratch, because there are reasons for all of the funkiness in the code. And rewriting fails spectacularly in code much of the time (see TextMate 2, for instance). Imagine how much success non-programmers would have at rewriting a complex system from scratch. That's roughly how much success I'd expect HN users to achieve at rewriting longstanding law.
I'm just saying, the outcomes may seem capricious, but picking at one string isn't going to improve things. If you think otherwise, you may have a bright career in the legislature.
Charging the same crime twice is unfair, where "same" is not something I am qualified to define in detail.
There. That seems good. I am not suggesting what to do about it at this point in time. By the way, I find it rather hyperbolic of you to look at a report of an uncommon bug and claim it calls for a total rewrite. No way in hell do I want to change the entire legal system. But if you're afraid to adjust something at all it just gets clunkier over time.
But, thinking as much like a lawyer as I can: you're never charged for the same "crime" more than once. There are overlapping laws, and one action can cause you to break more than one law (each of these is a separate "crime"). So I believe that legally speaking, Aleynikov is not being charged twice for the same crime, because he is not being charged again with breaking the same law.
So I'm saying that your simple tweak that "seems good" may have other problems, and may cascade in ways that we cannot predict (because we're not seasoned jurists). Also, I'm saying that lots of smart people who have dedicated their lives to the study of problems like this just may have stumbled on the simple adjustment you have stumbled across in 3 minutes of armchair quarterbacking, and thrown it out for a reason that is not immediately obvious to the layperson. You may have had similar experiences with non-programmers trying to redesign the guts of software; it's about as productive as this exchange. So you might not need to redesign the legal system from scratch, but step one in making adjustments is certainly deep knowledge and experience with the existing statutes and their application. (Similarly, you wouldn't be allowed to commit to the mainline branch of Git if you don't know C.)
If I had more time, I'd grope for an analogy in computers where two things appear the same to a layperson, but is actually different to programmers. I'm sure you can come up with several if you try.
For state and federal governments the cost of 2 trials is inconsequential.
For an individual the cost of two trials can easily push them into bankruptcy. Now if the individual is guilty you might not have that much sympathy for them, but consider that innocent people have to defend them selves in court as well.
The exception to this exception exists between city and state sovereignties located within the same state. Although cities are different sovereignties than the state they are located within, the two are not permitted to attach jeopardy more than once cumulatively.