     /// The underlying type that is contained in this wrapper.
     @inlinable var flatValue: Wrapped? {
         get { self.flatMap({ $0 }) }
-        set { self = newValue.flatMap(Self.init) ?? nil }
+        _modify {
+            var val = self.flatMap({ $0 })
+            yield &val
+            if let val = val {
+                self = Self(val)
+            } else {
+                self = nil
+            }
+        }
     }
 }
 

        self = .some(some)
    }

    /// Cover for `indirectValue`
    @available(*, deprecated, renamed: "indirectValue")
    @inlinable public var value: Wrapped {
        get { indirectValue }
        set { indirectValue = newValue }
    }

    /// The underlying value of this `IndirectEnum`.
    @inlinable public var indirectValue: Wrapped {
        get {

            case .some(let v): return v
            }
        }

        _modify {
            switch self {
