special handling of partial rules that can only have terminal symbol next;
we only need to search once for matching terminals.

speed: 336s -> 309s
VmPeak: 2914132kB -> 2783064kB
RSSMax: 2766976kB -> 2699148kB