Cleanup/3.x/clientproxy destroy

Cleanup of the client proxy destroy functionality.

Once this PR is merged, I'll make a backport for 3 maintenance.