register() method now first registers module dependencies *before* registering the module itself.