For ENG-5865, Fix some issues in accounting for empty vs non-empty export buffers.