anchor.diff:                  {ok, Solution, []} ->
                       Solution;
                   {ok, Solution, Discarded} ->
  -                    [warn_skip_pkg(Pkg, State) || Pkg <- Discarded],
  +                    [warn_skip_pkg(Pkg, State) || Pkg <- Discarded, not(pkg_locked(Pkg, Locks))],
                       Solution
               end,
  -            update_pkg_deps(Profile, S, Packages, Upgrade, Seen, State)
  -    end.
  -
  -update_pkg_deps(Profile, Pkgs, Packages, Upgrade, Seen, State) ->
  +            update_pkg_deps(Profile, S, Packages, Upgrade, Seen, State, Locks)
  +    end.
  +
  +pkg_locked({Name, _}, Locks) ->
  +    false =/= lists:keyfind(Name, 1, Locks).
  +
  +update_pkg_deps(Profile, Pkgs, Packages, Upgrade, Seen, State, _Locks) ->
       %% Create app_info record for each pkg dep
       DepsDir = profile_dep_dir(State, Profile),
       {Solved, _, State1}
  
positive.code: 
  warn_skip_deps(AppInfo, State) ->
      Msg = "Skipping ~s (from ~p) as an app of the same name "
            "has already been fetched~n",
      Args = [rebar_app_info:name(AppInfo),
              rebar_app_info:source(AppInfo)],
      case rebar_state:get(State, deps_error_on_conflict, false) of
  
negative.code: 
  warn_skip_pkg({Name, Source}, State) ->
      Msg = "Skipping ~s (version ~s from package index) as an app of the same "
            "name has already been fetched",
      Args = [Name, Source],
      case rebar_state:get(State, deps_error_on_conflict, false) of
          false -> ?WARN(Msg, Args);
  