A server crash was occasionally seen while running a query with Group By in a sub-query on multiple fields and Order By in the outer query. The problem occurred in a very specific optimization case that rarely occurs. It was triggered by a Group By in a sub-query with another sort above it in the main query. When the Group By was on more than one column, the error case was triggered. The logic has been corrected to eliminate this problem.