Fix bug that was introduced in the grammar refactoring.