Fix getPackageByServiceId (issue #4345)