Fix SHAPE attribute to be compatible with R and C++ OMX formats
Ensure shape of mapping is a one-tuple, not a scalar