Blueprint can't be nativized with a function with delegate-type input variable

I have been having issues packaging a project with Nativization set to Inclusive. The issue seems to be in passing a delegate to a function.

Steps to reproduce (tested in 4.20.3, still present in 4.22.2):

  1. Create empty project (code or blueprint)
  2. Create an Actor
  3. In the Actor, create an event dispatcher and a function that calls “Bind Event to DispatcherName”. Drag the event pin to the function input node to create a delegate-type input variable.
  4. In the Actor, call the function on BeginPlay. Connect a CustomEvent to the dispatcher pin.
  5. Place actor in map, add map to list of maps to package, set Nativization to Inclusive. Compile and package.

This results in the following log: Unreal cook log (nativization dispatcher variable bug) - Pastebin.com
The relevant part of the log being lines 626 - 628. So, it boils down to

Reason: cannot convert from 'ATestActor_C__pf1010915279::FTestComponentDispatcher__pf__TestComponent_C__pf__SinglecastDelegate' to 'const UTestComponent_C__pf1010915279::FTestComponentDispatcher__pf__TestComponent_C__pf__SinglecastDelegate'

The generated CPP file cannot convert the SinglecastDelegate to const SinglecastDelegate. The project packages fine without nativization and functions as intended, so this is clearly a natvization bug. Please let me know if there is a fix.

Hello,

We’ve recently made a switch to a new bug reporting method using a more structured form. Please visit the link below for more details and report the issue using the new Bug Submission Form. Feel free to continue to use this thread for community discussion around the issue.

https://epicsupport.force.com/unrealengine/s/

Thanks

Just in case anyone else has this issue, you can now track it here: Unreal Engine Issues and Bug Tracker (UE-64677)