SI-8425 don't create double-dollar names in c.freshName

If we append a dollar to a user-provided prefix that ends in a dollar,
we create a potential for confusion for backend phases. That's why
this commit prevents such situations from happening.
Merge pull request #3638 from xeno-by/topic/freshname-hotfix

SI-8425 don't create double-dollar names in c.freshName