public function isInsideBlock($blockName, $onlyUpper = false)
    {
        if ($onlyUpper) {
            return (end($this->_blockStack) == $blockName);
        }
        for ($i = count($this->_blockStack) - 1; $i >= 0; --$i) {
            if ($this->_blockStack[$i] == $blockName) {
                return true;
            }
        }

        return false;
    }