Issue #2791269 by amateescu, Peacog, drumm, Berdir: Allow saving pre-existing references to inaccessible items (cherry picked from commit d79a838e)