Fix `$digest already in progress` errors in Angular 1.1