Fix crash when showing form with definition for deleted widget
(Fix #9064)