public function &dget($key, $default = null)
    {
        $args = WF::flatten_array(func_get_args());
        if (func_num_args() > 1)
        {
            $default = array_pop($args);
            if (!($default instanceof DefVal))
                $default = new DefVal($default);
            $args[] = $default;
        }

        // Get the value, without referencing, so that we actually return a copy
        $result = parent::dget($args, null);

        if ($result instanceof Dictionary)
        {
            // Sub-arrays are returned as dictionary - which allow
            // modification without type checking. Re-wrap into
            // a TypedDictionary including the correct types
            $path = $args;
            $types = $this->types->dget($path);
            
            if (WF::is_array_like($types))
            {
                $dict = new TypedDictionary($types);
                $dict->values = &$result->values;
                $result = $dict;
            }
        }

        // Return the copy to keep it unmodifiable
        return $result;
    }