Alternative solution to fix #3880: unselect everything before associating a model.