Yes, the due process restriction against holding a person accountable under a law not in existence when the act occurred is a basic principle of law.  However, in this case, the law is inconsistent with the Gospels, and thus the word of God.  By applying human human standards of law, that defy those of the divine Son of God, the Church implicitly admits it is merely a human institution, and one that ignores what it claims are the words of God in the interest of its hierarchy.