Allow storing and restoring null instances in CurrentInstance #12509

Change-Id: Icf82377b0d47166d59e8be5f2f8b450d654302d7