Fix dirty handling for elements in an ng-grid (see https://git...

see https://github.com/angular-ui/ng-grid/issues/779