Refresh the RI object before deleting it because some information could be stale

Change-Id: I0ac1799f7e06fb49daf4c69568631eebe5a9d297
Closes-Bug: 1378482
(cherry picked from commit 9690431088d777073939a0a0a50480149e904be9)
Merge "Refresh the RI object before deleting it because some information could be stale" into R1.30