Support snapshot windows

Well no reason you didn't look at it Mark - I never created the PR. Apologies.

> Can't this be just map instead of flatMap?

Good catch. This was changed at some point, which is why it's wrong.