public function takeSnapshot()
    {
        $this->enabledBindingBefore = null;

        if ($this->bindingDescriptors->contains($this->uuid)) {
            $bindingDescriptor = $this->bindingDescriptors->get($this->uuid);

            if ($bindingDescriptor->isEnabled()) {
                // Clone so that rollback() works if the binding is unloaded
                $this->enabledBindingBefore = clone $bindingDescriptor;
            }
        }

        $this->snapshotTaken = true;
    }