Small optimizations on rect_nfa.