The clients of "get_key_index" expect index of key in matching case otherwise -1. But instead of this function returns the "undefined" value. Fixes: https://pagure.io/freeipa/issue/7678 Reviewed-By: Serhii Tsymbaliuk <stsymbal@redhat.com>