Application reloading often not working properly... :-(

The application reload during development does not work properly. Much too frequently while developing and debugging after I entered some source modification I end up in this exception:

2021-01-11 22:43:29,106 ERROR [http-nio-8080-exec-6]
java.lang.IllegalStateException: Can’t move a node from one state tree to another. If this is intentional, first remove the node from its current state tree by calling removeFromTree
at com.vaadin.flow.internal.StateNode.doSetTree(
at com.vaadin.flow.internal.StateNode.lambda$setTree$3(
at com.vaadin.flow.internal.StateNode.visitNodeTree(
at com.vaadin.flow.internal.StateNode.setTree(
at com.vaadin.flow.internal.StateNode.setParent(
at com.vaadin.flow.internal.nodefeature.NodeFeature.attachPotentialChild(
at com.vaadin.flow.internal.nodefeature.StateNodeNodeList.add(
at com.vaadin.flow.internal.nodefeature.ElementChildrenList.add(
at com.vaadin.flow.dom.impl.AbstractNodeStateProvider.insertChild(
at com.vaadin.flow.dom.Node.insertChild(
at com.vaadin.flow.dom.Node.appendChild(
at com.vaadin.flow.component.HasComponents.add(
at myapplication.ui.view.nodes.NodeView.editNode(
at myapplication.ui.view.nodes.NodeView.lambda$15(
at com.vaadin.flow.component.ComponentEventBus.fireEventForListener(

I.e. I edit something in my application, wait a few seconds until it has been rebuilt. Then I go to the browser and trigger a reload.
If things go well, I get another login-panel, I log-in and then the application is reloaded and I can “exercise” the just modified version.
Very often, however, I instead get the above exception and then the application is “broken”, i.e. I found no way to get it working again.
Reloading the page, even killing and restarting the browser will not get it into a working mode anymore. All it is emitting is this darn “java.lang.IllegalStateException”. The only way out is to stop and restart the application (and then reload the browser, once the UI has been compiled). :frowning: