Fix broken resuming due to incorrect comparison of numpy.nan values.