If this is happening on one of your own controls I've found that another solution is setting the DefaultStyleKey property to null:
DefaultStyleKeyProperty.OverrideMetadata(typeof(MyControl), new FrameworkPropertyMetadata(null));
I have no idea why this works, but it seems to!