workaround an scm exception

@gaurave, this isn't necessarily intended to land. I see an exception consistently with `pubspec.lock` files, even with your latest changes. This PR works around the issue, but I don't know of the implications this would have for the index state.