We appear to have fixed this problem by calling dlg_manage() before doing any set_dlg_profile() manipulations.
The documentation is not clear on whether dlg_manage() needs to be called first before doing this. But it makes me wonder: if dlg_manage() is prerequisite, then why would the profile manipulation work at all beforehand?