Fix https://github.com/icsharpcode/AvalonEdit/issues/1