distgit: fix infinite import loop for thunderbird
For some reason, `git checkout BRANCH` can fail. In case of
thunderbird, it fails with
stderr: 'error: Your local changes to the following files would be overwritten by checkout:
Please commit your changes or stash them before you switch branches.
I assume it is a packaging issue but we shouldn't try to import this
package again and again but rather mark it as failed and log the error.