Finds the most recent event before endIndex that contains a function call with the given ID.
endIndex
Finds the most recent event before
endIndexthat contains a function call with the given ID.