Fix breaking grouping by duplicate node entries.