Session:new_midi_route crashes ardour 9.2

Hi!
I’m trying to add a midi bus in Ardour 9.2, but it just segfaults Ardour so far…

current_midi_input = Session:new_midi_route(
                nil,                                  -- RouteGroup
                1,                                    -- Amount
                "MIDI_INPUT",                         -- Name
                true,                                 -- StrictIO
                ARDOUR.PluginInfo(),                  -- Plugin
                nil,                                  -- Preset
                ARDOUR.PresentationInfo.Flag.MidiBus, -- Type
                0                                     -- Position
            ) 

It did work in Ardour 8.12, did I encounter a bug here, or is something fixed that previously worked?

Just checked with the current official demo version, it crashed too.
GDB says:

Thread 1 "ArdourGUI" received signal SIGSEGV, Segmentation fault.
0x00007ffff7b8e79d in luabridge::CFunc::CallMember<std::__cxx11::list<std::shared_ptr<ARDOUR::Route>, std::allocator<std::shared_ptr<ARDOUR::Route> > > (ARDOUR::Session::*)(std::shared_ptr<ARDOUR::RouteGroup>, unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool, std::shared_ptr<ARDOUR::PluginInfo>, ARDOUR::Plugin::PresetRecord*, ARDOUR::PresentationInfo::Flag, unsigned int), std::__cxx11::list<std::shared_ptr<ARDOUR::Route>, std::allocator<std::shared_ptr<ARDOUR::Route> > > >::f(lua_State*) ()
   from /opt/Ardour-9.2.0-demo/lib/libardour.so.3

Thanks!
Vivien

Edit: The same code that flawlessly adds a midibus in (the flatpak version of) Ardour 8.12 just crashes Ardour 9.2 when entered into the scripting console.