Currently the IU location is updated in-place that has several
drawbacks:
- we need to synchronize a to not mess up things
- cached items in the object can getting stale and drip into new state
- equals and hashCode can become unstable over time
to overcome this the code is changed in a way that an update is
performed on a copy of the current state and a new object is returned
and used to perform the update.
Beside that there was an issue with refreshing a repository that do not
exits, this is now fixed by first adding it (and possibly remove it
afterwards).