anchor.diff:                          | EndingMode.Open -> ()
                           groupLoop isNoiseGroup gs
                       // The existing group is continuing.
  -                    | foundSymbol, _ ->
  -                        match currentGroup.AdvanceMode, foundSymbol with
  -                        | AdvanceMode.Token, true -> input.AdvancePastOffset(ofs, isNoiseGroup)
  -                        | AdvanceMode.Token, false -> input.AdvancePastOffset(0, isNoiseGroup)
  -                        | AdvanceMode.Character, _ ->
  +                    | _ ->
  +                        match currentGroup.AdvanceMode with
  +                        | AdvanceMode.Token -> input.AdvancePastOffset(ofs, isNoiseGroup)
  +                        | AdvanceMode.Character ->
                               // We advance by one character to avoid getting stuck; if a decision
                               // point immediately followed, it would have been already handled.
                               input.AdvancePastOffset(0, isNoiseGroup)
  
positive.code:     let oops = OptimizedOperations.Create grammar
  
      // Unfortunately we can't have ref structs on inner functions yet.
      let rec tokenizeDFA_impl (input: CharStream) ofs currState lastAcceptOfs lastAcceptSym (span: ReadOnlySpan<_>) =
          if ofs = span.Length then
              if input.TryExpandPastOffset(ofs) then
                  tokenizeDFA_impl input ofs currState lastAcceptOfs lastAcceptSym input.CharacterBuffer
              else
                  DFAResult.Create lastAcceptSym lastAcceptOfs ofs
          else
  
negative.code:             | [] -> ()
              | g :: gs ->
                  let currentGroup = grammar.Groups.[int g]
                  // When inside token groups, we ignore invalid characters at
                  // the beginning to avoid discarding just one and repeat the loop.
                  // We limit this optimization to those with closed ending mode because
                  // we cannot accurately determine when the final invalid characters end
                  // and the group ending starts. It would be easy because group ends are
                  // literal strings (except on line groups which are character groups)
                  // but that's an assumption we'd better not be based on.
                  let ignoreLeadingErrors =
                      // Seriously we cannot compare two structs without boxing?
                      // The equality operator calls an FSharp.Core intrinsic that
                      // boxes them, and casting to IEquatable boxes the structs
                      // instead of using constrained. At least I hope the JIT optimizes
                      // the second case's box away.
                      (currentGroup.AdvanceMode :> IEquatable<_>).Equals AdvanceMode.Token
                      && (currentGroup.EndingMode :> IEquatable<_>).Equals EndingMode.Closed
                  let dfaResult = tokenizeDFA ignoreLeadingErrors input
                  if dfaResult.ReachedEOF then
                      // Input ended but the current group can be ended by a newline.
                      if currentGroup.IsEndedByNewline then
  