Fixed single type shown in choose type dialog

Remove duplicates types returned by search engine right before exiting function instead of waiting until dialog is shown.

This should prevent the dialog to be displayed with a single item.