So, what is [nsv_array get ...] returning differently under the two circumstances? Maybe the nsv array moto_dealer is somehow not set when you call it from the wrapping template due to some difference in execution logic? The code sure looks ok to me.