[PATCH 05/10] vbscript: Factor out detach_global_objects.