Complete resolve_dep_order