Adding a simple heuristic to find leaf thunk functions.