Not sure what to think of this, except that it seems like this "masked matrix" stuff was always broken with indexing... It likely makes sense to actually change this, the finalization stage should attempt to fix the mask shape (needs test with matrix). But shape fixing in the data array and not having the same thing in the mask array, still seems like asking for trouble to me in any case (i.e. the whole reason why the .flat was needed)