Stop trying to keep two things in sync manually.
Issue #1670: Add a test for the correctness of the Range iteration optimization, covering circular and finite ranges.
Issue #1670: Improve the static Range iteration optimization (this commit for archival purposes, in case we ever want to bring this optimization back, since the next commit will remove this optimization completely).
Issue #1670: Remove the Range iteration optimization since it doesn't seem to achieve much.
Issue #1670: Update tests for the removal of static Range iteration optimization.
Issue #1670: Remove tests related to remove range iteration optimization