[FIX] correct checking for number of dimensions from variable names (its got nothing to do with elements dimensionalities!).