Correct handling of recursively-declared nested anonymous nonterminals