anchor.diff:          A#app.use_selected_vsn =:= undefined ->
               false;
           true ->
  -            {Dir, Dirs} =
  +            {Dir, Dirs, OptVsn} =
                   case A#app.use_selected_vsn of
                       undefined ->
  -			{shrinked, []};
  +			{shrinked, [], undefined};
                       false ->
  -			{shrinked, []};
  +			{shrinked, [], undefined};
                       true ->
  -			{A#app.active_dir, [A#app.active_dir]};
  -		    _ when A#app.is_escript ->
  -			{A#app.active_dir, [A#app.active_dir]}
  -                end,
  -            OptVsn =
  -                case A#app.use_selected_vsn of
  -                    undefined -> undefined;
  -                    false -> undefined;
  -                    true -> A#app.vsn
  +			{A#app.active_dir, [A#app.active_dir], A#app.vsn}
                   end,
               {true, A#app{active_dir = Dir,
                            sorted_dirs = Dirs,
  
positive.code: read_apps(C, Sys, [#app{mods = Mods, is_included = IsIncl} = A | Apps], Acc) ->
      {Mods2, IsIncl2} = read_apps(C, Sys, A, Mods, [], IsIncl),
      Status =
          case lists:keysearch(missing, #mod.status, Mods2) of
              {value, _} -> missing;
              false      -> ok
          end,
      UsesMods = [M#mod.uses_mods || M <- Mods2, M#mod.is_included =:= true],
      UsesMods2 = lists:usort(lists:flatten(UsesMods)),
  
negative.code: add_mod_config(Mods, ModConfigs) ->
      AddConfig =
          fun(Config, Acc) ->
                  case lists:keyfind(Config#mod.name, #mod.name, Mods) of
                      #mod{} = M ->
                          M2 = M#mod{incl_cond = Config#mod.incl_cond},
                          lists:keystore(Config#mod.name, #mod.name, Acc, M2);
                      false ->
  