Merge "Add missing lock to areAllUsersAffiliatedWithDeviceLocked" into main