Fix self tests when resaving test as hdf5 and reloading