[Fix #597] Don't process incomplete messages unless sure

  Probably also fixes the related #583 and #586.