(core) poping a context with a persisted object incorrectly updated reference counters, fixed