Enabling both TELEM1 and TELEM2 on Pixhawk2.1/Cube?

I have a telemetry radio connected to TELEM1 and a Raspberry Pi listening to MAVLink messages (using the dronekit library) from the Cube on TELEM2. For some reason, both don’t work at the same time: if Mission Planner is connected via TELEM1, the Pi generates errors when it tries to connect to TELEM2.

The specific error message (repeated indefinitely) is:

Exception in message handler for HEARTBEAT
mode 0 not available on mavlink definition

Are there parameters that can be changed to allow both to work at the same time?

Upon closer investigation, the error messages don’t actually prevent TELEM2 from being monitored by the Raspberry Pi; they’re simply annoying.

I read elsewhere that the messages result because dronekit “sees” both the Cube’s and the GCS’s Mavlink heartbeats and doesn’t know what to make of the latter.