A person shall not be punished for doing any act which does not constitute an offence under the law in force when the act was done.