anchor.diff:      LastPos: Lazy<int Set>
   }
   
  -type internal RegexBuildLeaves = RegexBuildLeaves of ImmutableArray<obj>
  +type internal RegexBuildLeaves = RegexBuildLeaves of ImmutableArray<RegexLeaf>
   with
       member x.Length = match x with | RegexBuildLeaves arr -> arr.Length
       member x.Characters idx =
           let (RegexBuildLeaves arr) = x
  -        match arr.[idx] with
  -        | :? RegexLeaf as leaf -> leaf.Characters
  -        | _ -> Set.empty
  +        arr.[idx].Characters
       member x.TryGetAcceptSymbol idx =
           let (RegexBuildLeaves arr) = x
  -        match arr.[idx] with
  -        | :? RegexEnd as leaf -> Some leaf.AcceptSymbol
  -        | _ -> None
  +        arr.[idx].AcceptSymbol
   
   let private fIsNullable =
       function
       | Concat (xs, _) -> xs |> List.forall (fun x -> x.IsNullable.Value)
       | Alt xs -> xs |> List.exists (fun x -> x.IsNullable.Value)
       | Star _ -> true
  -    // The set of a Chars regex must never be empty; it's just here for completeness.
  -    | Chars x -> x.Characters.IsEmpty
  -    // End is the end, so I guess it is nullable.
  -    | End _ -> true
  +    // An empty set means the end, so I guess it is nullable.
  +    | Leaf x -> x.Characters.IsEmpty
   
   let private fFirstPos =
       function
  
positive.code:             i'
      let leaves = ImmutableArray.CreateBuilder()
      let addLeaf x =
          leaves.Add(box x)
          x
  
      let desensitivizeCase chars =
  
negative.code:         |> fst
      | Alt xs -> xs |> Seq.map (fun x -> x.LastPos.Value) |> Set.unionMany
      | Star x -> x.LastPos.Value
      | Leaf x -> Set.singleton x.Index
  
  let private makeLazy tree = {
      Tree = tree
  