Add icon class to tree-node based on context, id, and parent