Add support for intercepting thunks of the form