Fixing the tag elements class delegation for the collapsed and branch expanded state which caused some display and functionality issues.

...pansion state which caused some display and functionality issues