MDL-39641 repository: Correct check for uniqueness of the name