Fix #556: Unhandled WPF exception in SharpDevelop v5 beta