Bugfix: moving a dead object turned the new object live.

This caused a null pointer dereference in the finaliser, which
thought it had to kill a live object (by locking the mutex).
Slightly more abstraction of the instance locking.