Merge "Fix an NPE that can result from a race condition." into oc-dev