Procedure to determine which query crashed a leaf node