     }
     
     private func addContentSizeObserver() {
-        addObserver(self, forKeyPath: keyPath, options: [.new, .old], context: nil)
+        addObserver(self, forKeyPath: keyPath, options: [.new, .old], context: &kvoContext)
     }
 }

                               change: [NSKeyValueChangeKey : Any]?,
                               context: UnsafeMutableRawPointer?) {
        
        if self.keyPath == keyPath {
            if let new = change?[.newKey] as? NSValue,
                let old = change?[.oldKey] as? NSValue,
                new != old {
                invalidateIntrinsicContentSize()
            }
        }
    }
    

final class IntrinsicSizeAwareScrollView: UIScrollView {
    
    private let keyPath = #keyPath(UIScrollView.contentSize)
    private var kvoContext = UInt8()
    
    override init(frame: CGRect) {
        super.init(frame: frame)
