We need to extend the engine-side check for package imports (a.k.a. "Carl's check") with logic similar to [#21740](https://github.com/digital-asset/daml/issues/21740)