Avoid error trace when removing object references from DGC

Change-Id: I66f9da292f1e6eb5fac55aa6dbd1e9c60f7748b2