I spent a little bit of time looking into this with OllyDbg. I didn't find the exact source of the bug, but thought I'd at least leave a small note that relates to this.
I set a hardware breakpoint to see where the cargo is cleared after deploying a building. It is done here:
0043ADA0 SUB ESP,0A8 ; Function: void Unit.ProcessForGameCycle()
...
0043BB2D MOV BYTE PTR DS:[ESI+22],0A ; Unit.action = 0x0A [moObjFroze]
0043BB31 MOV WORD PTR DS:[ESI+24],0 ; Unit.cargoOrWeapon = 0 [mapNone]
I didn't see any surrounding code that looked like it created a new building. Not surprising considering this seems to be a timing bug, so that's likely done elsewhere in the code.