fix #5070

some gc roots I thought were redundant turn out not to be in the case of
replacing modules in strange times.