Fix restore resource priorities aliasing that can skip restoring resources
