[sdb] Fix setting of byref variables in registers. Fixes #17185.