Correct the check of an already existing branch with the same name in Exec()