Oh, duh. Yes, I see now. I was reading it as if `end` weren't being reassigned.