Fix #1827 bug where extra setInterval()s can be called during animation.