That's the problem I run into also...
I don't know why but the only way I could get it to work is by puting it wayyyy at the top...
I mean at line 1 (one) NOT in or above the "Main" I mean at the very top of the .wdl.......
Try again...