Fix a missing flush that was failing to store the dimensionality in the HDF5 file.