Fix TypeError Cannot call method 'querySelectorAll' of undefined in ngAnimate

Fix TypeError Cannot call method 'querySelectorAll' of undefined in ngAnimate when use ng-if on ng-repeat fix #6205

More about issue is here https://github.com/angular/angular.js/issues/6205