Fix ASN.1 parsing of certain invalid structures that can result