Fix instantiation of module dependencies