Fixes local copy optimization

The previous optimization #32 has problem that restoration requires assignment operator.