A court must not make a declaration of contravention or a pecuniary penalty order against a person for a contravention if the person has been convicted of an offence constituted by conduct that is substantially the same as the conduct constituting the contravention.