Add an assertion to check that the value of N_MESSAGES is correct.
Also add a note about unused standard message names in class.doc.