Adjusting for variable handling when passing through variable when nesting in EmuQL. Needs more tweaking as it doesn't work quite right.