Empty idtypes are already handled to be excluded. Still empty group elements are generated When IDs are linked from other file. This is due to missing `id->lib` check. Without this, group element of respective ID is generated even when ID doesn't belong to that library. If `id->lib` isn't matching, skip creating group tree element for them. Resolves #145720 Pull Request: https://projects.blender.org/blender/blender/pulls/145779