Change method for merging enviornments for packages

Right now packages' config is merged using `array_merge` instead of
`mergeEnvironment` as I would have expected.

If there is a specific reason for this, I would love the discussion
but this does not break any unit tests either.