coverity 1403324 negative array index: check for finding an unknown value and error if so (since it shouldn't happen).
coverity 1403324 negative array index: check for finding an unknown value and error if so (since it shouldn't happen).

Reviewed-by: Tomas Mraz <973cc78d8b4cb00714230ba9be0225e917ab4ac6@fedoraproject.org>
(Merged from https://github.com/openssl/openssl/pull/13091)

openssl/openssl,openssl/openssl,openssl/openssl,openssl/openssl,openssl/openssl,openssl/openssl