Resolves: RHBZ#2224124
Imported from dotnet-sig/dotnet8.0 commit ecce7a2b28: ecce7a2b28 Resolves: RHBZ#2224124
ecce7a2b28