I uploaded 10300.patch which should fix the GCC compile error reported above. It probably won't get added into the main repository until next Sunday but feel free to use this for the time being.
Thanks for the quick patch! It should work, but I think it should be possible to do this in a much simpler manner. Try replacing FString truncatedPrefix = self; with FString truncatedPrefix = self.GetGenericRep(CVAR_String).String;. Same for Suffix.
You're right. I re-uploaded the patch with your suggestions, it should be a lot simpler now.
I added the updated patch.
Fails to compile with either GCC 10 or CLang 11 (Manjaro Linux). CLang has good verbosity so posting that information. Maybe compiles okay in MSVC?