[BUILD] fixed linker error due to variable shadowing