animationComplete: Remove only the handler attached by us

(cherry picked from commit 8a7451b105fc291727b7979f56117d5d0f435652)

Closes gh-7267
Fixes gh-7265