When no -toprule is given ps selects the first public rule. In cases, when jsgf grammars are imported, it could be the rule from external grammar, which is unexpectedly selected, although parent grammar is especially made with ps jsgf restrictions in mind (has only one public rule which is supposed to be selected).
Suggested patch attached.
Thanks for the report. I've committed slightly different patch, now this issue should be fixed.