[FIXED JENKINS-24050] Do a isValid before doing isReadable()
[FIXED JENKINS-24050] Catch cancelled key