Fall back on cummulative time when finding root

The heuristic of finding a function that is never called
doesn't always work, so when that fails just find the function
with the largest cummulative time.