fix bug that made failure to decrypt unpredictable

This led to occasional failures of the "decryption
fails" test, which led to broken build warnings.