Load an entire track from a trkpreset

I’m trying to load an entire track from a track preset that I created in Waveform. The preset contains a rack plugin. This works fine in Waveform but in my program, the Rack Instance - racktype is throwing an assertion because the racktype is null when the track tries to instantiate the plugin.
I assume this is because my method for creating the track (from a valuetree) doesn’t seem to call addRackTypeFrom(). Thus the rackType doesn’t exist in the edit.

What’s the correct way to achieve this?