Fix build not returning when cloning a dart repo.

Temporary fix to #2602 

The analyzer runs into an infinite loop when a dart repository is cloned and `pub get ` is run automatically. The build is triggered twice and I suspect that few of the `workspace.ADD` events are passed twice making the analyzer run into a loop.

This temporary fixed the issue for me. We need to revisit `workspace` events and the `analyzer`.
A reference to the bug at least.