When computing the new type of a collapse_shape operation, we need to at least take into account whether the type has an identity layout, in which case we can easily support dynamic strides. Otherwise, the canonicalizer creates invalid IR.
Longer term, both the verifier and the canoncializer need to be extended to support the general case.
You should short-circuit here, it does not make much sense to pass isIdentityLayout to the isReshapableDimBand.