I see - the uavobjecttreemodel _is_ a QAbstractItemModel.  However this means we should do as that method guides us and implement it further down the model as implementing it here may allow other similar bugs later.

if you go into addInstance, you see that it calls TreeItem->appendChild.  However, the TreeItem has no handle to the UAVObjectTreeModel so I think addInstance is where this should be included.  That will require asking the model for the number of branches under the object node (TreeItem->ChildCount) but shouldn't be hard.