Is one of the calls the Tableau capability check? It would be something like the below to check to see if temp tables can be created for the connection established?
SELECT TOP 1 *
FROM (SELECT 1 AS COL) AS CHECKTEMP
If it really is as you describe--a potentially older version of your query--I would try and create a new workbook to see if it reproduces there as well. Would be an interesting test to see if this solves it.