Merge "Fix error handling for non-dynamic permissions" into sc-dev