I guess this function is already within a PERFORM_AGGREGATION ifdef?  There's an #endif at line 4168 which is probably that, but just checking.