Issue #1712: Add a test.
Fix #1712.

It appears I can fix ANTLR's line counting by overriding
`ANTLRStringStream.consume()`. However, `ANTLRStringStream` and its subclasses
expose a lot of constructors (for making streams out of `char[]`, files,
`Reader`s and `InputStream`s), so I'd actually need to subclass all of
these. Normally I would use a decorator, but (and I never knew this) java
won't let me access the protected fields of another instance of a class even
though I extend that class. So it's simplest to just fix it for the
compiler, rather than offering multiple subclasses of `ANTLRStringStream`
for every possible case.
Issue #1647 turns out that 0.5s to sum to 10M is too ambitious when running the concurrent tests.