Element tree, minor fix related to PR #11479

This is a minor fix related to the element tree fixes in PR #11479. Only affects release-2.2 branch as develop already has this fix in :)