anchor.diff:      ?dbg("m ~p",[M]),
       {Yi, Types} = parse_expand(<<M/binary, ".yang">>, L, Opts, Ps),
       Prefix = case lists:keyfind(prefix,1,IOpts) of
  -		 {prefix,_,Pfx,_} -> 
  +		 {prefix,_,Pfx,_} ->
   		     Pfx;
   		 false ->
   		     %% The prefix substatement is mandatory in modules
   		     {_, _, Pfx, _} = lists:keyfind(prefix,1,Yi),
   		     Pfx
   	     end,
  -    orddict:store(Prefix, #mod{module = M,
  -			       prefix = Prefix,
  -			       data = Yi,
  -			       typedefs = Types}, Dict).
  +    orddict:store(
  +      {prefix,M}, Prefix,
  +      orddict:store(Prefix, #mod{module = M,
  +				 prefix = Prefix,
  +				 data = Yi,
  +				 typedefs = Types}, Dict)).
   
   
   parse_expand(F, L, Opts, Ps) ->
  
positive.code: 			 %% We have to guess, although we really should know.
  			 Mod;
  		    true ->
  			 ?dbg("Elem ~p,~nMod ~p,~n Ps ~p",  [Elem, ModR, Ps]),
  			 throw({unknown_prefix, [extension, L, Pfx, Extension]})
  		 end;
  	     #mod{prefix = Pfx} -> 
  		 Pfx
  	 end,
      [{{Mp,Extension},L,Arg, expand_elems_(Data, ModR, Ps)}
       | expand_elems_(T, ModR, Ps)];
  %% expand_elems_([{{ext,_,_},_,_,_} = Ext|T], ModR) ->
  %%     %% already expanded
  %%     [Ext| expand_elems_(T, ModR)];
  expand_elems_([{Elem,L,Name,Data} = Stmt|T], ModR, Ps) ->
      %%?dbg("Stmt ~p,~nMod ~p", [Stmt, ModR]),
      [{Elem,L,Name,fix_expanded_(expand_elems_(Data, ModR, Ps))}
       | expand_elems_(T, ModR, Ps)];
  
negative.code: find_prefix(Pfx, #mod{imports = Imports}) ->
      case orddict:find(Pfx, Imports) of
  	error ->
  	    case orddict:find({prefix,Pfx}, Imports) of
  		error -> false;
  		{ok, ActualPrefix} ->
  		    %% The "prefix" was in fact a module name (already expanded)
  		    orddict:fetch(ActualPrefix, Imports)
  	    end;
  	{ok, #mod{} = ModI} ->
  	    ModI
      end.
  