Fix issue with multiple vars with the same uid.
Fix repo schema upgrade.
Add explicit dependency on repos code.
Fix interrupted updates.