LUN-1563: simplified the logic of group name generation