anchor.diff:      end;
   more_apps_in_rels([], _Apps, Acc) ->
       Acc.
  -
   
   apps_init_is_included(S, Apps, RelApps, Status) ->
       lists:foldl(fun(App, AccStatus) ->
  
positive.code: 
  apps_in_rel(#rel{name = RelName, rel_apps = RelApps}, Apps) ->
      Mandatory = [{RelName, kernel}, {RelName, stdlib}],
      Other =
  	[{RelName, AppName} ||
  	    RA <- RelApps,
  	    AppName <- [RA#rel_app.name |
  			%% Included applications in rel shall overwrite included
  			%% applications in .app. I.e. included applications in
  			%% .app shall only be used if it is not defined in rel.
  			case RA#rel_app.incl_apps of
  			    undefined ->
  				case lists:keyfind(RA#rel_app.name,
  						   #app.name,
  						   Apps) of
  				    #app{info = #app_info{incl_apps = IA}} ->
  					IA;
  				    false ->
  					reltool_utils:throw_error(
  					  "Release ~tp uses non existing "
  					  "application ~w",
  					  [RelName,RA#rel_app.name])
  				end;
  			    IA ->
  				IA
  			end],
  	    not lists:keymember(AppName, 2, Mandatory)],
      more_apps_in_rels(Mandatory ++ Other, Apps, []).
  
  more_apps_in_rels([{RelName, AppName} = RA | RelApps], Apps, Acc) ->
      case lists:member(RA, Acc) of
  
negative.code: 	    more_apps_in_rels(RelApps, Apps, Acc);
  	false ->
  	    case lists:keyfind(AppName, #app.name, Apps) of
  		#app{info = #app_info{applications = AA, incl_apps=IA}} ->
  		    Extra = [{RelName, N} || N <- AA++IA],
  		    Acc2 = more_apps_in_rels(Extra, Apps, [RA | Acc]),
  		    more_apps_in_rels(RelApps, Apps, Acc2);
  		false ->
  