The bug with carrying over dx penalty still exists. See the proof below.
It's never too late for unit tests! I wrote a bunch for melee before, but probably not in the language you're using? If the app is free, you can consider open sourcing the code?
http://i.imgur.com/PZzCAM2.jpg
Edit: here's some source for a sample unit-test (hope you can get the idea) that asserts that no dx penalty occurs at the start of the round, that it exists after the hero takes 5 hits, and that it persists for at least an entire round:
dexPenaltyLastsOneCompleteRound: function (o) {
assert(o.hero.sufferingDexPenalty()).not();
o.hero.takeHits(5);
assert(o.hero.sufferingDexPenalty());
o.hero.newRound();
assert(o.hero.damageTakenThisRound()).equals(0);
assert(o.hero.sufferingDexPenalty());
o.hero.newRound();
assert(o.hero.sufferingDexPenalty()).not();
},