anchor.diff:     NoEmptyType = (Type#xqSeqType.occur == one orelse 
                     Type#xqSeqType.occur == one_or_many), 
      NewCtx      = add_grouping_variable(NewPosVar, 
  -                                       add_grouping_variable(NewVar, Ctx)),
  +                                       add_grouping_variable(NewVar, 
  +                                                             remove_variables(Rem, Ctx))),
      FunctionName = glob_fun_name(Part),
      LocCtx = set_context_variable_name(Ctx, '__Ctx'),
      OldVariableTupleMatch = case get_variable_tuple(Ctx) of
  
positive.code:    ThisFun = glob_fun_name(F),
     NextFun = glob_fun_name({return, RetId}),
     {NewCtx,FunAbs} = if Curr =:= 'let' ->
                             let_part(Ctx, F, NextFun, IsList);
                          true ->
                             for_loop(Ctx, F, NextFun, IsList)
                       end,
     Call1 = [?P("_@NextTupleVar = '@ThisFun@'(_@CurrContext,_@@Vars)")],
     Call2 = [?P("_@NextTupleVar = '@ThisFun@'(_@CurrContext,xqerl_seq3:flatten(_@TupleVar))")],
  
negative.code:                            enext = ENext,
                             only  = Only,
                             start_expr = StartExpr,
                             end_expr = EndExpr}, NextFunAtom, IsInitial, Rem) ->
     _ = set_line(Line),
     OldCtxname = get_context_variable_name(Ctx),
     LocCtx = set_context_variable_name(Ctx, '__Ctx'),
  