static function pathSet(&$values, $pathParts, $value) {
        $r = &$values;
        $last = array_pop($pathParts);
        foreach ($pathParts as $part) {
            if (!isset($r[$part])) {
                $r[$part] = array();
            }
            $r = &$r[$part];
        }
        $r[$last] = $value;
    }