This can probably be done using the composeVApp method instead of the instantiateVApp method. Instantiate has a few limitations, most of which revolves around the modification of VMs. I'll do some testing and get back to you.
The other option, of course, is to do the modification after the Instantiate.
Cheers,
Jake