Support modules registered from hooks in makeStaticLoader

Change-Id: I7205a1a07f0127dc91cfa159d2a8b4de92192188