Added check against empty refinement history in HDF5 output.