Nested namespace declarations are not handled correctly by Camunda BPMN editor

We are using Camunda web-based modeler version 5.0.5 for editing BPMN diagrams stored and executed via Flowable. So there is the Flowable namespace in the definition. We also added our own custom tags (“customextension”) like this:

<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  xmlns:flowable="http://flowable.org/bpmn"
  xmlns:customextension="http://customextension.com/bpmn"
  typeLanguage="http://www.w3.org/2001/XMLSchema"
  id="definitions">
  <process id="myid" customextension:mytag="myvalue">
    <startEvent id="start" flowable:sometag="somevalue"/>
  </process>
</definitions>
etc

This works fine so far: when editing via Camunda, both customextension and flowable tags are preserved when saving back to the Flowable service.

However, it goes wrong when I change the to this:

  <process id="myid" xmlns:customextension="http://customextension.com/bpmn" customextension:mytag="myvalue">

While this is valid XML as far as I know, Camunda throws this error:

missing namespace information for  flowable:expression = something 

Does anybody know what might be wrong here?

Note: I also created this topic on https://forum.bpmn.io/t/nested-namespace-declarations-are-not-handled-correctly-by-camunda-bpmn-editor/5250, not sure what’s the best forum.