Changes tree helper implementation to create only html tags if there are really children as hasChildren() can say yes if there is at least one in the database but was not fetched