[BZ 1120418] flush deletes to avoid constraint violation when regenerating steps