Fix PG grouping error in Links index