OS-2357 when updating a model, if branch has leaves are direct children then combine the leaves and recreate branch