To replace uses of `HashMap<E::Id, _>` and allow to use a more efficient backing implementation in the future.