Merge "Fix permission state missing when backup is restored." into sc-dev