prevent setting dirty_epoch to the future; use defined() instead of truth in several...