Merge "Use correct UserId when checking for lock state" into sc-dev