From: Rabbi Moshe Sofer
To: Rabbi Hersh Leib Segal
A Jew received an idol as collateral without accepting achrayus after a court awarded him a deceased priest's estate toward a debt. The Chasam Sofer rules all money received is permitted: the court ruling created only a creditor's lien rather than a kinyan, so the idol was never truly the Jew's property; the 50 gold coins already exchanged for grain are chalifei chalifin of a rabbinic prohibition, which are universally permitted; and the nullification performed by a neighboring non-Jew is effective at least at the Torah level.
Source: Shu"t Chasam Sofer YD §127