Added a check so that CAS:Client is not called more than once.

Resolved #5175, #5117, #5105.