Merge "Reduce the scope of holding the mPidsSelfLocked lock" into main