Ardour 9.5 crashes when clicking Expand/Collapse MIDI Inspector in empty cue

Every time I click the Expand/Collapse MIDI Inspector button in an empty MIDI cue, Ardour 9.5 crashes. The only error message logged to the console is “Segmentation fault (core dumped)”. The feature works fine on cues that already contain some MIDI.

I am using Linux Mint 22.3 - Cinnamon 64-bit.