Fixed Issue #5147 collapsingbug in einsum