Fix bug in testing for presence of challengekeyid