[OE-3937] fixed diagnoses element crash when the first diagnosis is deleted.