title: Rails ".pluck" on joined tables with columns of the same name returns one value and then nil
body: <pre><code>Experiment has_many :features 
  Feature belongs_to :experiment
  
  Experiment.where("experiments.id=1")
      .joins(:features)
      .pluck("features.id", "experiments.id")
  </code></pre>
  
  <p>I expect this to return the id of each features and the id of the experiment.</p>
  
  <pre><code>[
      [1, 1],
      [2, 1],
      [3, 1],
      # ....
  ]
  </code></pre>
  
  <p>Instead this returns the id of the experiment and then nil</p>
  
  <pre><code>[
      [1, nil],
      [1, nil],
      [1, nil],
      # ....
  ]
  </code></pre>
  
  <p>This is strange in three regards:</p>
  
  <ul>
  <li>even though it is an inner join and only an Experiment is returned I am able to pluck columns from features (features.name)</li>
  <li>everything is fine until a column name is repeated.</li>
  <li>the last plucked column is reported first, as if the first column is overwritten. Switching the order of pluck switches the returned value.</li>
  </ul>
  
  <p>This seems like a bug but maybe I am doing something wrong. Any tips?</p>
  
  <p>SQL output:</p>
  
  <pre><code>SELECT features.id, experiments.id FROM "experiments" INNER JOIN "features" ON "features"."experiment_id" = "experiments"."id" WHERE (experiments.id=1)
  </code></pre>
  
  <p>Note. This is a simplified question pertaining to a query looking like:</p>
  
  <pre><code>Experiment.where("experiments.id=1")
      .joins(feature: { child2: { :child3 } })
      .pluck("feature.id, child3.id")
  </code></pre>