The variable nfa is not cleaned before each loop iteration and can have a wrong value of nfa.nhs_reuse from the previous step. Thanks to Bernardo Figueiredo for the bugreport and analysis.