fix(ng-repeat): should correctly handle detached state

Closes #697