How to determine if an Incident was thrown in CompensationTask or not?

In my IncidentHandler, I want to determine if the Incident was caused within an CompensationTask or not.
In the XML the Task has the Attribute: isForCompensation=true

To search for this Attribute i only have the IncidentContext.

How can i determine if my Incident was thrown in an CompensationTask, or not?