anchor.diff:          {#var{}, #cons{}} -> Cons=R
       end,
       clause_to_rete(C#clause{args=[Cons, _LastWMO, _StateForm]});
  -clause_to_rete(#clause{args=[ConsForm, _LastWMO, _StateForm],guards=Guards}) ->
  +clause_to_rete(#clause{args=[#cons{}=ConsForm, _LastWMO, _StateForm],guards=Guards}) ->
       % Create a build fun at the beginning to avoid unwanted occasional clash with local variables
       BuildFun=fun(AlphaForm, {#rete{anodes=ANodes,
                                      bnodes=[#bnode{bnode_ids=BIds}=BNode|Tail]}, 
  
positive.code: 
  -spec merge(#rete{}, #rete{}) -> #rete{} .
  
  merge(#rete{}=Path,
        #rete{bnodes=[],anodes=[]}=Tree) ->
      merge(Path,Tree#rete{bnodes=[make_terminal_bnode()]});
  
negative.code:                     {#rete{anodes=[], bnodes=[make_terminal_bnode()]},[]}, 
                      AlphaFormsOredred),
      #rete{anodes=lists:reverse(ANodeList),
            bnodes=lists:reverse([H#bnode{pnodes=true}|T])};
  clause_to_rete(#clause{args=[#var{}|_]}) ->
      #rete{}.
  
  %
  % Merge left to right
  