Fixed concurrency bug

`mAnimations.size()` needs to be evaluated at every iteration just like the `mChildren` iteration loop below to ensure the size is updated right away when animations are registered and unregistered dynamically.