Generate local var only if not yet allocated