Fix instance expansion.

Was getting a constraint violation due to using insert instead of replace.
bug 2439297
2 files changed