Fix tokenizer bug with error for multi-line input (GitHub #2515)

Changes:

- Fix GitHub issue #2515