Export problem with linuxsampler

I have a session which makes use of the linuxsampler plugin (32 channels version). The setup is like this:
Midi track A --> Midi track C with Linuxsampler plugin --> Bus D --> Master
Midi track B --> Midi track C with Linuxsampler plugin --> Bus E --> Master
A and B have the actual midi regions. C is just a placeholder for the LS plugin. First 2 outputs of C go to bus D. Next two outputs of C go to bus E. If you ever used recent versions Linuxsampler plugin I suppose you are familiar with this setup (see discussion here: https://bugs.linuxsampler.org/cgi-bin/show_bug.cgi?id=188).
Everything works fine on playback. The problem is on export. I can hear the very first midi note in the exported file but then something gets disconnected and there’s no more midi output to Linuxsampler. Looking at the meters in the mixer it seems that tracks A and B play back as usual, but C stops receiving their input. The meter of C pops up for the first note and then remains down all the way through the export. Again, on playback, everything is fine and A and B are correctly played through C. Am I missing something?

What version of ardour?

version 3.4, binary downloaded from ardour.org.