(possibly wrong)
Most certainly wrong I'd say ! The function aims at destroying the furthest part of a particular program. The way it is right now, it destroy the furthest part only IF it is of that particular program.
Guess you found the problem ! <img src="smileys/smiley2.gif" border="0" align="middle" />
(Don't forget that if you keep it function embedded, you must call the function in a for each loop !)