Fix category display issues in the element tree

* origin/pr/11479:
  Fix category display issues in the element tree
Minor fix related to PR #11479