Description
Just like we fixed getFiniteStrings to not consume stack in proportion to the longest string accepted by the automaton (LUCENE-5628), isFinite has the same limitation. The fix is pretty simple; I just share the code from getFiniteStrings, but allocate two BitSets up front like the current impl.