Use more efficient way to locate end of an ASN1 structure.