Fix #12846. Restore overflow when animation is stopped.

(Cherry picked from a6c358d)