Fixed bug that caused the lexer to walk off the end of the buffer.