optimization when adding child groups
Merge pull request #3115 from sergevanginderachter/groupdepth

optimization when adding child groups