Changed a bit the DFA for lists in order to improve performance for long lists.
   - making a single circular call to the element instead of multiple ones to the same list. Avoids the quadratic behavior.