Sure, any measurement system will fail, but there are means to make them more robust. One way is to make it so that what is measured is what is desired: gaming the system results in more of the desired behavior. Consider a support desk measured not by time-to-resolution or call volume, but post-resolution surveys: in order to 'game' the measurement, the agents must actively seek to promote customer satisfaction.
Another, more controversial, means for more robust measurements might be an overt, active gamification. Using your example of LoC: instead of unilaterally praising large (or small) work efforts, LoC is used as the measurement in a bid war. I'm not envisioning a particular bid process (silent auction? Liar's dice style round-robin?) but anybody can call BS on the latest bid ... which then holds that bidder to implement. Beat your own estimate for praise, but for punishment you would have to exceed the prior (non-BS) wager. Couple a second bid value (deadline, for example) and the complexities of actively "gaming the system" becomes nigh on impossible.
Between this article about the Atlanta cheating scandal and the NPR story you linked, I wholeheartedly believe that the "standardized test" regimen is currently broken. However, I was hopeful that you might have some suggestions on alternative measurements or ways we could better apply the current ones.