Merge "Fix crashes when clearing storage for a protected package" into sc-dev