More robust in-place module reloading