I'm afraid it most certainly does for myself and other programmers I know. My "walking around and contemplating" is a completely different mental state than flow for me, and flow produces an entirely different league of results above and beyond any other mode of working I've been in.
If I could discipline, harness, and achieve flow more quickly (like the people who teach themselves to dream lucidly) I would be a much better programmer.
As it is, I'm currently contemplating how to cope with the apparent health risks of sitting all day vs. achieving flow.
Going even a week without flow tends to depress me, I doubt I could make disrupting my work multiple times daily a regular part of my habits.