Merge "fix race condition that can cause a use after free" into oc-dev
am: 2d45cf2a40

Change-Id: Ib574c8c9887fecd4ca542d92d61671d6c8a3625e