Introduce a flag protecting parser level optimizations.
Fix reporting of parsing errors.
Let the parser expand repetitions of strings into longer strings.