Improve messages for missing 'then' statements.