Added head of branch flag to UserDepartments for issue #6941. Users and departments trees expanded with name property