diff --git a/src/Avalonia.Base/PropertyStore/ValueStore.cs b/src/Avalonia.Base/PropertyStore/ValueStore.cs index 093235955e..a90bb4eb73 100644 --- a/src/Avalonia.Base/PropertyStore/ValueStore.cs +++ b/src/Avalonia.Base/PropertyStore/ValueStore.cs @@ -141,7 +141,6 @@ namespace Avalonia.PropertyStore { var frame = GetOrCreateImmediateValueFrame(property, priority); result = frame.AddValue(property, value); - InsertFrame(frame); } if (TryGetEffectiveValue(property, out var existing)) @@ -528,6 +527,7 @@ namespace Avalonia.PropertyStore private void InsertFrame(IValueFrame frame) { + Debug.Assert(!_frames.Contains(frame)); var index = _frames.BinarySearch(frame, FrameInsertionComparer.Instance); if (index < 0) index = ~index;