stricter _check_key, fixes #17