This actually is the biblicaly proscribed solution.
You lie to frame someone about a crime and are discovered, you get the sentence.
I would apply the same principle to cops, DA’s witnesses and judges who lie, withhold evidence or set people up.