title: jQuery Deferred should work but doesn't
body: <p>I have a spotify app and want to wait for a loop to finish. But it only works after reloading my app once.</p>
  
  <pre><code>function matchRecommendations(result) {
  var deferreds = new Array();
  for ( var i = 0; i &lt; result.length; i++) {
      // Async wait
      var dfd = $.Deferred();
      deferreds.push(dfd.promise());
  
      ...
  
      // Wait for search to finish
      search.tracks.snapshot(0, 1).done(
              function(snapshot) {
                  // If match was found =&gt; create recommendation object
                  var uri = snapshot._uris[0];
                  var meta = snapshot._meta[0];
                  if ($.type(meta) !== "undefined") {
                      if ($.type(meta.name) === "string") {
                          console.log(uri);
                          var rec = new Recommendation(uri, meta,
                                  explanation, score);
                          RadioView.prototype.addRecommendation(rec);
                      }
                  }
  
                  // Async task finished
                  dfd.resolve();
              });
  }
  
  return deferreds;
  } 
  </code></pre>
  
  <p>Here I'm calling the above method and want to wait for it to finish.</p>
  
  <pre><code> $.when.apply($, matchRecommendations(result)).done(
                              function() {
                                  console.log("finished");
                                  RadioView.prototype.render();
                              });
  </code></pre>
  
  <p>I can't see the Problem why this souldn't work. The problem is the "done" callback is not executed when loading for the first time. If I reload the app it works just fine
  ...Anything wrong with the Deferred Stuff?</p>