fix special cases of reducedim for prior fix to any() and all()