Disable GC when updating a registration to avoid accessing a terminated object