If 120th or 240th value is not a 1, k still passes the check in the switch, causing the last value to be lost. If this value occurs at the boundary of a block, the max time will be incorrect, resulting in compaction failing to make forward progress.