Fixed bug where non-looping animations would call on_dirty when their dir was changed on the last frame.