Karl, I have had the same issue in the past before. I did not find the actual answer to the problem, however I found a work-around. What I did is creating a new QV document that "bootstraps" the actual qvw. I use something similar to the following within the script code:
execute cmd.exe /c "Path to Qlik\QV.exe" /r path\to\qvw\app.qvw;
I hope somebody can provide you with the actual solution.