public function isWithinCachedBlock(Mage_Core_Block_Abstract $block) {
        $step = $block;
	$i = 0;
        while ($i++ < 20 && $step instanceof Mage_Core_Block_Abstract) {
            if (!is_null($step->getCacheLifetime())) {
                return true;
            }
            $step = $step->getParentBlock();
        }
        return false;
    }