[BUG] Fix bug introduced by gh-2195 merged yesterday.

This relax a condition in DimShuffle to help reuse it.

We where removing the DimShuffle, it was working when it was only
adding outer dimensions, as the Elemwise would readd it. But if it did
other stuff, we where loosing what it did.