Under CII version 20 using the extended profile, the generated e-invoice might contain an empty InvoiceIssuerReference section.
This generates a validation warning, because empty sections are not allowed.
This problem does not exists when writing with version 23.
I've fix it already be copying the code from version 23 to version 20.