Fix EZP-23532: Languages lost from content when using packages

Applied Gaetano's old fix from EZP-16847 after verifying that it still works.
Merge pull request #1103 from glye/ezp-23532_language_lost_when_packaging

Fix EZP-23532: Languages lost from content when using packages