GROUP BY queries with a self-join (join to the same table) that were grouped by columns with indexes returned the wrong result in some cases.