Suspect convicted as ‘drug dealer’ under invalid law