• The working plans have an extra compute scalar operation... which seems to be where the data is shot in the variable.

    In the failing plan, there's a difference in the compute scalar. Instead of fetching the table names, it fetches 2 columns (probably where it sets the data in the variable)... then it forgets to concatenate anything!