That gets the the purpose of true, organic government: [1] to protect the innocent; [2] to keep the poor and the widow safe from oppression; [3] to promote or uphold equity; [4] to protect the upright from the base, low, and degenerate (same as #1). Anything too far from that and you might just be dealing with organized crime posing as lawful government (relevantly: The Dangers of Municipal Trading; Racketeering).
Reversing the transaction would at the least promote equity and restore parties to their original condition. To declare a proper sale to never have transpired: more robbery under the guise of officialdom. If a judge is using the court to enrich his revenue base, whether in collusion with others or not, he is biased and should be recused.