anchor.diff:              ulist(T, [H | Acc])
       end.
   
  -plugin_modules(_Config, []) ->
  +plugin_modules(_Config, _SubdirAssoc, []) ->
       {ok, []};
  -plugin_modules(Config, Modules) ->
  +plugin_modules(Config, SubdirAssoc, Modules) ->
       FoundModules = [M || M <- Modules, code:which(M) =/= non_existing],
  -    plugin_modules(Config, FoundModules, Modules -- FoundModules).
  -
  -plugin_modules(_Config, FoundModules, []) ->
  +    plugin_modules(Config, SubdirAssoc, FoundModules, Modules -- FoundModules).
  +
  +plugin_modules(_Config, _SubdirAssoc, FoundModules, []) ->
       {ok, FoundModules};
  -plugin_modules(Config, FoundModules, MissingModules) ->
  -    {Loaded, NotLoaded} = load_plugin_modules(Config, MissingModules),
  +plugin_modules(Config, SubdirAssoc, FoundModules, MissingModules) ->
  +    {Loaded, NotLoaded} = load_plugin_modules(Config, SubdirAssoc, MissingModules),
       AllViablePlugins = FoundModules ++ Loaded,
       case NotLoaded =/= [] of
           true ->
  
positive.code:     %% Find relevant sources in base_dir and plugin_dir
      Erls = string:join([atom_to_list(M)++"\\.erl" || M <- Modules], "|"),
      RE = "^" ++ Erls ++ "\$",
      BaseDir = rebar_config:get_global(base_dir, []),
      %% If a plugin is found in base_dir and plugin_dir the clash
      %% will provoke an error and we'll abort.
      Sources = rebar_utils:find_files(PluginDir, RE, false)
          ++ rebar_utils:find_files(BaseDir, RE, false),
  
negative.code:     %% directories that should be processed _before_ the current one.
      Predirs = acc_modules(Modules, preprocess, Config, ModuleSetFile),
  
      SubdirAssoc = remember_cwd_subdir(Dir, Predirs),
  
      %% Get the list of plug-in modules from rebar.config. These
      %% modules may participate in preprocess and postprocess.
      {ok, PluginModules} = plugin_modules(Config, SubdirAssoc),
  
      PluginPredirs = acc_modules(PluginModules, preprocess,
                                  Config, ModuleSetFile),
  