It's possible that he wrote that thinking "for" but typing "while". And then read it over and over again looking for an error, each time not noticing that it was a while, not a for. I know that kind of thing happens to me not as infrequently as I would wish.