public function getVariable($name, $compilationContext = null)
    {
        /* Check if the variable already is referencing a branch */
        $pos = strpos($name, Variable::BRANCH_MAGIC);
        if ($pos > -1) {
            $branchId = (int) (substr($name, $pos + \strlen(Variable::BRANCH_MAGIC)));
            $name = substr($name, 0, $pos);
        } else {
            $branch = $this->resolveVariableToBranch($name, $compilationContext ?: $this->compilationContext);
            if (!$branch) {
                return false;
            }
            $branchId = $branch->getUniqueId();
        }
        if (!isset($this->branchVariables[$branchId]) || !isset($this->branchVariables[$branchId][$name])) {
            return false;
        }

        return $this->branchVariables[$branchId][$name];
    }