Rework iterators to work on windows again
(...which apparently hasn't worked for some time, what fun)