Fixed a crash provoked by constraint editing form when switching the
constraint type on the second time the form is opened.