     instance._kvcKeyPathStringPtr =
       kvcStringPtr.assumingMemoryBound(to: CChar.self)
   }
-
-  if instance._kvcKeyPathStringPtr == nil, isPureStruct {
+  if instance._kvcKeyPathStringPtr == nil, let offset = pureStructOffset {
     instance.assignOffsetToStorage(offset: Int(offset))
   }
   // If we can cache this instance as a shared instance, do so.

  let (keyPathClass, rootType, size, _)
    = _getKeyPathClassAndInstanceSizeFromPattern(patternPtr, arguments)

  // Used to process offsets for pure struct KeyPaths.
  var offset = UInt32(0)
  var isPureStruct = true
  var keyPathBase: Any.Type?
        
  // Allocate the instance.
  let instance = keyPathClass._create(capacityInBytes: size) { instanceData in
    // Instantiate the pattern into the instance.
    let returnValue = _instantiateKeyPathBuffer(
      patternPtr,
      instanceData,
      rootType,
      arguments
    )
    offset += returnValue.structOffset

    let componentStructList = returnValue.componentStructList
    if componentStructList.count == 0 {
      isPureStruct = false
    }
    for value in componentStructList {
      isPureStruct = isPureStruct && value
    }
    keyPathBase = rootType
  }

  // TODO: See if there's a better way to eliminate
  // tuples from the current `isPureStruct` optimization.
  if let keyPathBase = keyPathBase, instance.isTuple(keyPathBase) {
    isPureStruct = false
  }
  if isPureStruct {
    instance.assignOffsetToStorage(offset: Int(offset))
  }

  // Adopt the KVC string from the pattern.

  _ origDestData: UnsafeMutableRawBufferPointer,
  _ rootType: Any.Type,
  _ arguments: UnsafeRawPointer
) -> UInt32? {
  let destHeaderPtr = origDestData.baseAddress.unsafelyUnwrapped
  var destData = UnsafeMutableRawBufferPointer(
    start: destHeaderPtr.advanced(by: MemoryLayout<Int>.size),
