Sync not completing correctly when repo definition itself is updated.
I.e. a repo is sync'd that contains the definition of another (Git) repo.
What can be observed is that both repos initially pull updated, the first repo invalidates however the second.
The second when coming up in a worker detects a config change and cleans the DB and then fails as the DB is not refreshed/found anymore (as it is a worker).
It should be the case that:
1. Everything that has become invalid is invalidated
2. For the nested repo, this means that everything is invalid (?)
3. Everything is broad up again.