[TECH SUPPORT] LPS-46584

Hey Brian,

This fix is quite simple, the DL portlet preferences can contain a folder from an external repository, and we haven't properly updated it.

Ákos' fix solves the problem, we need to maintain the primary keys map for that and update the preferences with the proper imported value.

I'm currently writing a test for this, but it will also include some additional test refactoring, I've decided to send it separately because it might contain lots on totally unrelated commits.

Thanks,

Máté

cc: @sergiogonzalez