diff --git a/src/backend/access/heap/vacuumlazy.c b/src/backend/access/heap/vacuumlazy.c
index 9364cd4..9889e48 100644
--- a/src/backend/access/heap/vacuumlazy.c
+++ b/src/backend/access/heap/vacuumlazy.c
@@ -1072,10 +1072,10 @@ lazy_scan_heap(Relation onerel, VacuumParams *params, LVRelStats *vacrelstats,
 					 *
 					 * If the tuple is HOT-updated then it must only be
 					 * removed by a prune operation; so we keep it just as if
-					 * it were RECENTLY_DEAD.  Also, if it's a heap-only
-					 * tuple, we choose to keep it, because it'll be a lot
-					 * cheaper to get rid of it in the next pruning pass than
-					 * to treat it like an indexed tuple.
+					 * it were RECENTLY_DEAD.  Also, either if it's a heap-only
+					 * tuple or when index cleanup is disabled, we choose to
+					 * keep it, because it'll be a lot cheaper to get rid of
+					 * it in the next pruning pass than to treat it.
 					 *
 					 * If this were to happen for a tuple that actually needed
 					 * to be deleted, we'd be in trouble, because it'd
@@ -1085,20 +1085,11 @@ lazy_scan_heap(Relation onerel, VacuumParams *params, LVRelStats *vacrelstats,
 					 * preventing corruption.
 					 */
 					if (HeapTupleIsHotUpdated(&tuple) ||
-						HeapTupleIsHeapOnly(&tuple))
+						HeapTupleIsHeapOnly(&tuple) ||
+						params->index_cleanup == VACOPT_TERNARY_DISABLED)
 						nkeep += 1;
 					else
-					{
 						tupgone = true; /* we can delete the tuple */
-
-						/*
-						 * Since this dead tuple will not be vacuumed and
-						 * ignored when index cleanup is disabled we count
-						 * count it for reporting.
-						 */
-						if (params->index_cleanup == VACOPT_TERNARY_ENABLED)
-							nleft_dead_tuples++;
-					}
 					all_visible = false;
 					break;
 				case HEAPTUPLE_LIVE:
