do deep copy before creating CloudClient
Merge pull request #12934 from gtmanfred/develop

do deep copy before creating CloudClient