Avoid inconsistent state when remove fails.

Bug: 5433432
Change-Id: Ia388fda006cbda09b5947fc61cec6353f75a3805
1 file changed