"Illegal TEXT reference to a private object in external package" with UObjects constructed using "Construct Object from Class"

In my project, I have a “'procedure” BP that has an array of “step” UObjects. I have child classes of this procedure BP for different procedures, and I am attempting to populate their array of step UObjects via an “actor action utility” editor script (I am selecting an actor in the viewport, then running the script to add a step related to this asset to my procedure BP).

To do so, I am using “Construct Object from Class” to create a step UObject, setting its Outer to the ClassDefaultObject of the procedure BP, and adding it to the BP’s steps array. This works great, except for that I cannot copy and paste the generated step to another procedure BP. When attempting to do so, I get the error “Illegal TEXT reference to a private object in external package.”

If I manually open my procedure BP and use the + to add an entry to a procedure BPs step array to create an entry, I can copy and paste it to another procedure BPs steps array just fine. Only the steps added via my script have this issue.

Can anyone help me figure out the correct way to construct a UObject and add it to my BP so that I can copy and paste them between my BPs without issue?


Pictured: how I am getting the CDO from my procedure BP. “GeneratedProcedureContainer” is my Procedure BP asset.


Pictured: The “construct object from class node,” setting the Outer to the procedure BP CDO. I then cast to the type of step I have created so I can set the values on the UObject, before I add it to the procedure BPs step array. The Procedure BP asset is then saved.