This error comes about because some systems seem to have credential labels with the first letter capitalized, rather than being all lowercase. To duplicate the issue, update the labels in the credential_definitions table.
I'm not entirely sure whether labels should or should not be capitalized, but for upgrade purposes, I think we have to assume that some may be; so my solution is just to downcase the key string.
Mainn