Report the right token in the error message.

Fixes #1322