Fix message comparison: take 2

Earlier attempt failed on upstream master.