ns-contrib type dependencies are not downloaded into the ns3 contrib folder

When specifying a <module name="whatever" type="ns-contrib"> in a configuration file, they are correctly downloaded in the source/ns-3xxx/contrib folder if manually enabled.

However, if another ns-contrib module depends on it via <depends_on name="whatever" optional="False" />, then enabling the whatever module through dependencies only will put it in the source folder instead of the source/ns-3xxx/contrib folder.

I believe the issue can be fixed with:

diff --git a/bake/Bake.py b/bake/Bake.py
index b27e743..ea9f63f 100644
--- a/bake/Bake.py
+++ b/bake/Bake.py
@@ -226,7 +226,7 @@ class Bake:
             dep_mod = configuration.lookup (dep._name)
             if dep_mod.mtype() == "ns-contrib":
                 # Do not prepend contrib prefix to user supplied contrib name more than once
-                if not(module.get_source().attribute("module_directory").value.startswith(fmod + '/contrib')):
+                if not(dep_mod.get_source().attribute("module_directory").value.startswith(fmod + '/contrib')):
                     dep_mod.get_source().attribute("module_directory").value = fmod+'/contrib/'+dep_mod.get_source().attribute("module_directory").value
                 dep_mod.addDependencies(ModuleDependency(fmod, False))
                 self.resolve_contrib_dependencies (dep_mod, fmod, configuration)