Fix error when grammar contains to error productions