The following grammar results in build failure, if generated with --optimize-grammar. The same grammar builds with out problem, if the option is not set.
Minimal example:
X ← z:Z
Y ← Z
Z ← ('Z' { return nil, nil })?
Build error:
(*parser).callonZ3 undefined (type *parser has no method callonZ3)