IllegalArgumentException when removing and adding

When i remove a dockable like this

...
SingleCDockable view = (SingleCDockable)m_dockControl.getCDockable(0);
m_dockControl.remove(view);
...```
and then try to re-add this dockable
```...
view.setLocation(CLocation.base().normal());
m_dockControl.add((SingleCDockable)view);
...```
i get an exception from the ModeManager that says:
'There is already a dockable registered with the key: single main'
But i explicitly removed that dockable. 
Maybe i get this exception because i am using a singleBackupFactory, but how do i re-add that dockable after removing?

Thanks in advance for any help!
Greetings, -chris-

I have to try this myself, but you should never see any exceptions from the ModeManager -> most likely a bug.

I’m not quite sure what happened, but there were some calls execute in the wrong order. And yes, the single-backup-factory was part of the problem (if a backup factory is installed, not all data gets deleted when removing a dockable).

I’ve committed a repaired version to the repository.

Hi Beni,
thanks very much for the fix. It works!
Greetings, -chris-