Slightly vectorize env tcgen