test fix for exceptions during clean up

The problem is now this lock is going to be destroyed; but the local proxies are not.