public function set($key, $value)
    {
        Assume::that(is_scalar($key));
        if (isset($this->emptySubset)) {
            $this->createTrueSubset();
        }
        $oldValue = null;
        if (isset($this->data[$key])) {
            $oldValue = $this->data[$key];
        }
        if (isset($key) and isset($value) and $key !== '') {
            $this->data[$key] = $value;
        } else {
            $this->data[$key] = null;
        }
        if (! $this->root->updated and $oldValue !== $value) {
            $this->root->updated = true;
            $this->root->update();
        }
    }