Move local table copying to definition site