anchor.diff:  def({#c_var{name={F,Arity}}=Name,B0}) ->
       try
           put(new_var_num, 0),
  -        {B1,_} = cerl_trees:mapfold(fun pre/2, fun post/2, sub_new(undefined), B0),
  +        {B1,_} = cerl_trees:mapfold(fun pre/2, fun post/2, sub_new(none), B0),
           erase(new_var_num),
           {Name,B1}
       catch
  
positive.code:             erlang:raise(Class, Error, Stack)
      end.
  
  pre(#c_let{vars=Vars}=Node, Sub) ->
      {Node,sub_fold(get_variables(Vars), Sub)};
  
  pre(#c_fun{vars=Vars}=Node, Sub) ->
      {Node,sub_fold(get_variables(Vars), Sub)};
  
  pre(#c_clause{pats=Pats}=Node, Sub0) ->
      VarNames = get_variables(Pats),
      Sub1 = sub_fold(VarNames, Sub0),
      Keys = get_pattern_keys(Pats),
      Sub2 = sub_add_keys(Keys, Sub1),
  
      #sub{v=SubNames,t=Temp} = Sub2,
      Sub3 = Sub2#sub{v=merge_variables(VarNames, SubNames),
                      t={clause,Pats,Keys,SubNames,Temp}},
  
      {Node#c_clause{pats=[]},Sub3};
  
  pre(Node, Sub0) ->
      %% We cache only tuples and cons.
      case cerl:is_data(Node) andalso not cerl:is_literal(Node) of
          false ->
  
negative.code:     Sub2 = sub_unfold(Sub1#sub{v=V,t=T}),
      {Node#c_clause{pats=Pats1},Sub2};
  
  post(#c_clause{}=Node, Sub) ->
      {Node,sub_unfold(Sub)};
  
  post(#c_let{}=Node, Sub) ->
      {Node,sub_unfold(Sub)};
  
  post(#c_fun{}=Node, Sub) ->
      {Node,sub_unfold(Sub)};
  
  post(Node, Sub) ->
      {Node,Sub}.
  
  