Fixed the not init agents in the tree group view. Ticket: #1584
(cherry picked from commit 28f68531a122ea9d5f8bc67fddcd9f893a1fea45)