Fix for the checking of the study name if its unique to check as well on folder

Reviewer: Tiff Go

Issue: GCP-8786