Fixed some errors and omissions in the lexer_monoid code.