This reverts commit 0689edd6. Reapply D139022 without `enumerate` over `zip` to fix build errors on gcc 9.4.