Iterating over ranges by Year doesn't work as expected if leap years are involved

I suspect the problem is in valueOf(), but I'm not sure enough about moment's internals to be able to say with certainty. The problem doesn't appear if you pass naked dates in, only if you pass in moment()'s.

Sorry I can't be more helpful than by adding a failing test.