- /* wimlib v1.6.3: pack streams by default if the WIM version number is
- * that usually used in solid archives. */
- if (wim->hdr.wim_version == WIM_VERSION_PACKED_STREAMS)
+ /* wimlib v1.6.3: pack streams by default if the WIM version has been
+ * set to WIM_VERSION_PACKED_STREAMS and at least one stream in the
+ * WIM's lookup table is located in a packed resource (may be the same
+ * WIM, or a different one in the case of export). */
+ if (wim->hdr.wim_version == WIM_VERSION_PACKED_STREAMS &&
+ wim_has_packed_streams(wim))
+ {