Merge "Fix restoring of permissions after a reboot."