anchor.diff:     add_inscope_variable(State, {A,B,C,D,false});
   % {Name,Type,Annos,ErlVarName,External}
   add_inscope_variable(#state{inscope_vars = Vars} = State, {#qname{namespace = Ns, local_name = Ln},_,_,_,_} = NewVar) ->
  -   ?dbg("NewVar",NewVar),
  -   ?dbg("Vars",Vars),
  +   %?dbg("NewVar",NewVar),
  +   %?dbg("Vars",Vars),
      NewVars = [NewVar | [Var || {#qname{namespace = Ns1, local_name = Ln1},_,_,_,_} = Var  <- Vars, {Ns1,Ln1} =/= {Ns,Ln}]],
      State#state{inscope_vars = NewVars}.
   
  
positive.code:    if IsLib ->
           digraph:add_vertex(G, library);
        true ->
           digraph:add_vertex(G, library)
     end,
     %G = digraph:new([acyclic]),
     % add the variables
  
negative.code:          end
     end.
  
  get_array_type(#xqFunTest{kind = array, type = any}) ->
     array;
  get_array_type(#xqFunTest{kind = array, type = #xqSeqType{type = AType}}) ->
     get_array_type(AType);
  get_array_type(#xqFunTest{kind = map}) ->
     map;
  get_array_type(O) ->
     ?dbg("O",O),
     O.
  
  % for now until other stuff fixed
  