Handle cycling with dir=-1 correctly