Use local() instead of copying the hash

What it says on the tin.