Dont update index for .lock files.
Don't update self while updating git status in scm.
Merge pull request #2539 from dart-lang/fix_git_index_exception

Fix git index exception