Fixed side-effect bug in NdMapping add_dimension method