SIO-1136 Bugfix in package reupload

Fix small bug in package reupload.
Adds test.

Change-Id: If388a0828ec33c050a7b906b55ff624850b3f309