Fixed a bug where in EBNF expansion in the CFG builder.

Multiple copies of the expansion productions were being generated
because the grammar wasn't being checked for existing productions.