MovingAverage bug and unit test for issue #1538
MovingAverage tests nit, issue #1538
Merge pull request #1626 from BoltzmannBrain/unittest_bug

MovingAverage bug and unit test, Fixes #1571