UAssetManager::AddDynamicAsset requires BundleData now in UE 5.8

Summary

My dynamic assets being added stopped working with UE 5.8. The reason is the code change in UAssetManager::AddDynamicAsset.

5.7:
TypeData.FindOrAddAsset(PrimaryAssetId.PrimaryAssetName, FSoftObjectPtr(AssetPath), AssetPath, AssetPathMap);
if (BundleData.Bundles.Num() > 0)
{
CachedAssetBundles.Add(PrimaryAssetId, MakeShared<FAssetBundleData, ESPMode::ThreadSafe>(BundleData));
}

5.8:
if (BundleData.Bundles.Num() > 0)
{
TypeData.FindOrAddAsset(PrimaryAssetId.PrimaryAssetName, FSoftObjectPtr(AssetPath), AssetPath, AssetPathMap);
CachedAssetBundles.Add(PrimaryAssetId, MakeShared<FAssetBundleData, ESPMode::ThreadSafe>(BundleData));
}

What Type of Bug are you experiencing?

Editor

Steps to Reproduce

Add a dynamic asset with an empty bundle data

FAssetBundleData GameDataBundles;
AssetManager.AddDynamicAsset(MyPrimaryAssetId, MyDataAssetSoftObject.ToSoftObjectPath(), GameDataBundles);

Now when you try to load this it will fail because the assets was never added because GameBundleData is empty. That used to be ok in older versions.

Expected Result

Asset should load using StreamableHandle = AssetManager.LoadPrimaryAsset(SkinPrimaryAssetId, Bundles, Delegate);

Observed Result

It fails to load the dynamic asset that was added because I did not associate it with a game bundle data.

Affects Versions

5.8

Platform(s)

Android
iOS
Linux
Mac
OpenXR
visionOS
Windows