WPF Hanging in Infinite Rendering Loop