jtag: fix shadow issues in adapter_init