anchor.diff:  %%  chains so we never have to search more than once.  Use orddict so
   %%  we know the format.
   %%
  +%%  In addition to the list of substitutions, we also keep track of
  +%%  all variable currently live (the scope).
  +%%
   %%  sub_subst_scope/1 adds dummy substitutions for all variables
   %%  in the scope in order to force renaming if variables in the
   %%  scope occurs as pattern variables.
  
positive.code:     S = [{-1,#c_var{name=Sv}} || Sv <- gb_sets:to_list(Scope)]++S0,
      Sub#sub{v=S}.
  
  sub_is_val(#c_var{name=V}, #sub{v=S}) ->
      v_is_value(V, S).
  
  v_is_value(Var, Sub) ->
      any(fun ({_,#c_var{name=Val}}) when Val =:= Var -> true;
  	    (_) -> false
  	end, Sub).
  
  %% clauses(E, [Clause], TopLevel, Context, Sub) -> [Clause].
  %%  Trim the clauses by removing all clauses AFTER the first one which
  
negative.code: 
  %%pattern(Pat, Sub) -> pattern(Pat, Sub, Sub).
  
  pattern(#c_var{}=Pat, Isub, Osub) ->
      case sub_is_val(Pat, Isub) of
  	true ->
  	    V1 = make_var_name(),
  	    Pat1 = #c_var{name=V1},
  	    {Pat1,sub_set_var(Pat, Pat1, scope_add([V1], Osub))};
  	false ->
  	    {Pat,sub_del_var(Pat, Osub)}
      end;
  pattern(#c_literal{}=Pat, _, Osub) -> {Pat,Osub};
  pattern(#c_cons{anno=Anno,hd=H0,tl=T0}, Isub, Osub0) ->
  