Fix scope bug: reuse existing variable offset