As much as I want to agree with this statement, I can't help but feel that it's highly problematic in some sense.
When it comes to court cases (IANAL, but this is my understanding), law enforcement officials' testimony is treated with a certain measure of elevated credibility (there's SCOTUS precedent for this, but I can't seem to find the cases). Violation of that trust - as in this case - should be penalized, but I don't know what kind of remedy would be appropriate.