Take cause into account when grouping error messages