It seems to me that the 1st block is skipped when you specify both but just wanted to clarify
Specifying environments variables by either method should work and not conflict with each other, unless the same variable is define. In this case, I believe the template block definition would take precedence.
If you have a job specification that show something not working as expected, please share it and I can take a look.
jrasell and the Nomad team