core: fix problem where rsc_gone insertion would crash if there is already a 'gone' entry for the rsc.
This is in the category 'should not happen', but also happened in production.

(cherry picked from commit 3d7bb33adad44109ab77e2bcbf839456a56d34d4)