Merge "Check for any permissions before holding any sf locks" into sc-dev