The check for "dirty" executes the following command:
git update-index -q --refresh
This can take a considerable amount of time if the index does
need to be refreshed (particularly with the mono repo). This
situation can arise when building shared source on a host in
This change moves the check, so that it is only done if a tag is
found. As there are no tags the check is not done.