anchor.diff:              | _ -> ()
                   
       member this.ChooseSingleAst () = 
  -        this.EliminateCycles()
           for x in order do
               if reachable.[x] then
                   match nodes.[x] with
                   | NonTerm list ->
  -                    match !list with
  -                    | h::_::_ -> list := [h]
  -                    | _ -> ()
  +                    match
  +                        !list |> List.tryFind
  +                            (fun (_, children) ->
  +                                children
  +                                |> Array.forall (fun j -> pos.[j] < pos.[x] && reachable.[j]))
  +                        with
  +                    | Some v ->
  +                        if list.Value.Length > 1 then
  +                            list := [v]
  +                    | None ->
  +                        reachable.[x] <- false
  +                        list := []
                   | _ -> ()
           for x in order do
               reachable.[x] <- false
  
positive.code:             let u = stack.Pop()
              if u < 0 then
                  res.Add <| -u-1
              else
                  stack.Push <| -u-1
                  reachable.[u] <- true
                  match nodes.[u] with
                  | NonTerm list ->
                      !list |> List.iter iterChildren
                  | _ -> ()
              
          let ret = res.ToArray()
  
negative.code:                 match nodes.[x] with
                  | Term t -> result.[x] <- box t
                  | Epsilon eps ->
                      result.[x] <- epsilons.[eps].Translate funs leftSides concat [||]//epsilons
                  | NonTerm list ->
                      let res = 
                          !list
  