Fixing typos in is_keyid function definition and usage

Fixes #4068