root module on allocation

While allocating a module, set_const and module_export can allocate memory so the module must be rooted.
This could be the cause of #6637 but I'm not sure.
I don't think anybody actually ever hit the second one since it is very rare but well...
Thanks, it is a huge relief to have problems like this found and fixed.
Aren't methods only removed or replaced by adding new definitions? Does inference do that?