Loop Prevention from Call Forwarding

Hi,

I have a macro that allow a user to forward their calls to another extension. 

I want to be able to limit the number of forwards the call can go through before being dumped to voicemail or to a Busy tone. Does anyone have a way to prevent the loops which will work? I am using version 1.0.9 not the CVS HEAD version, which does appear to support inheritance of variables, and would allow me to do this simply.

If the prevention is not in place, the server loops through 499 channels jumping to voicemail / Busy. 

Wildheart.