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

Applied Gaetano's old fix from EZP-16847 after verifying that it still works.

https://jira.ez.no/browse/EZP-23532
https://jira.ez.no/browse/EZP-16847
missing code doc above on this argument, what it is supposed to be and what it does.