Merge "fix race condition introduced by CL https://android-git.corp.google.com/g/40395"