1401: fix protected repositories when doing --restore-defaults