Issue #210: refresh `newRegistry` right before restoring `oldRegistry`