Don't reset tokenstream before passing to the MemoryIndex, otherwise some tokenizer might swallow tokens.

Closes #2814