I'm confused by that last line, because units granted through worldbuilder would not have limited duration. I just tested it again. Limited duration Water Elementals summoned by the Water 3 spell unloaded their cargo just fine, while the Rifts summoned by Dimensional III spell always killed them. I then decided to test with units placed in worldbuilder instead of summoned, and found that the Water Elementals were permanent but the Rifts were still expiring. This made me realize that I had set the Rift to have <Special>SPECIALUNIT_SPELL</Special>, which was causing it to be killed elsewhere in the DLL before it reached the code that forced it to unload its cargo. After removing that, it is working fine.