Make sure a target with given name does not exists

Ticket:	#3521