Fix for error/warning messages not recorded in ASTs. Changed errors
annotation to messages.