Extended definition of FlatIterationOrder

Dimensions of size one are ignored in the check whether
two FlatIterationOrders are the same.
Added test for FlatIterationOrder