Looking through this function, it looks like the fast path should work even for multi-dimensional arrays when `newtype == NULL && flags == 0)`. Could you also check to verify that that is correct?