Log component visibility and enabled flags in debugComponentTrees

(cherry picked from commit 23963c2e1a4070835b24316055798ca6d3ab4d89)