Adjust grouping algorithm to exclude logger and culprit (fixes GH-744)