Fix some HDF5 writing bugs for calcLikeDouble.