Log replay: Simplify calculation of replay_last_epoch.

This calculation is equivalent to the earlier one, but easier to
understand.