Fixing window iteration code to not abort in the middle of the loop

This is a simple change, but it ensures the iteration over the windows doesn't end prematurely.

(I've not done too many pull requests. The [first one](https://github.com/erikvold/toolbarbutton-jplib/pull/2#issuecomment-12446883) on erikvold/toolbarbutton-jplib had only my commit, but this one looks to have one from @erikvold too…)