Modify InstantiateSucceeded to cope with main modules, which do not have a name and should not go into the module registry.
Fix number of arguments to InstantiateSucceeded.