Export fails if "add silence to end" enabled

Ardour 3.1 export failed with an error message about “audio mapper: resample”. I’m exporting a whole session from 48kHz S/R in Ardour to 32 bit linear WAV at 44.1kHz S/R, with settings:
trim silence from beginning and end, add silence to beginning and end. The error report comes up right at the end of the export process.
If I uncheck the “add silence to end” setting, the export works fine.
I’m nowhere near the machine on which I run Ardour at the moment, so I can’t file a detailed bug report yet, but does this behaviour look familiar to anyone?
I’ll try to create a minimal setup to reproduce this.