title: Azure pipeline base template inserting name key in environment
body: <p>I have a base template that accepts a stageList parameter. I don't do anything with the jobs in those stages:</p>
  <pre><code>parameters:
  - name: stages
    type: stageList
    default: []
  
  stages:
  - ${{ parameters.stages }}
  </code></pre>
  <p>I'm passing into that a stage that contains a deployment job. I have hardcoded the environment for testing purposes, but even so it inserts the key &quot;name: environment&quot; under environment:</p>
  <pre><code>resources:
    repositories:
    - repository: templates
      type: git
      name: basePipelineTemplatesHost/basePipelineTemplatesHost
  
  extends:
    template: templateExtendedByDeployment/template.yml@templates
    parameters:
      stages:
      - stage: buildStage1
        jobs:    
        - deployment:
          displayName: Deploy to demo environment
          environment: DTL-Demo-Env
          strategy:
            runOnce:
              deploy:
                steps:
                - script: echo test
  </code></pre>
  <p>Resulting in the following rendered yaml:</p>
  <pre><code>    environment: {
        name: DTL-Demo-Env
      }
  </code></pre>
  <p>This causes the job to run on a hosted vm instead of my on-prem environment agent. Is this a bug?</p>