Long hostgroup prototypes name are created on first run of discovery. On next runs it is lost seems on the comparison step. And hosts are unassigned from previously created group.
1: LLD -> host prototype -> group prototype -> Enter long name
2: Discover entities at least two times.