protected function _dereferenceTokens($value)
    {
        if (is_scalar($value) && !is_string($value)) {
            return $value;
        }

        try {
            $value = $this->_normalizeString($value);
        } catch (InvalidArgumentException $e) {
            return $value;
        }

        $container  = $this->_getContainer();
        $tokenStart = $this->_getTokenStart();
        $tokenEnd   = $this->_getTokenEnd();

        try {
            $value = $this->_replaceReferences($value, $container, null, $tokenStart, $tokenEnd);
        } catch (ContainerExceptionInterface $e) {
            throw $this->_createRuntimeException($this->__('Could not de-reference tokens'), null, $e);
        }

        return $value;
    }