title: Why is knockout firing afterRender event twice?
body: <p>I have a knockout template that is loading perfectly, but the afterRender event is firing twice.. I thought it was some problem in my data object causing the function to get called once accidentally and once by the afterRender, but I have reduced it to an alert, and it still get's called twice.</p>
  
  <p>Here's the html code... </p>
  
  <pre><code>&lt;body&gt;
   &lt;div id="control-wrap" data-bind="template: { name: 'control_bar', data: App.Controls, afterRender: function(){ alert('test');} }"&gt;&lt;/div&gt;
   &lt;div id="map_canvas" style="width:100%; height:100%"&gt;&lt;/div&gt;
   &lt;div id="info-window-container" data-bind="template: { name: 'info-yacht-racing', foreach: App.Transponders.transponders, afterRender: App.Tracker.infoWindowInit}"&gt;&lt;/div&gt;
   &lt;div id='notice-overlay'&gt;&lt;/div&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p>The biggest problem is that I have no idea where to troubleshoot this form? Any idea? can i use the Chrome inspector to track what is triggering the event? Would the google map renderer being mucking something up? would a foreach with the template cause the parent template call to trigger more then once?</p>
  
  <p>whiteatom</p>
  
  <p>UPDATE: 
  The strangeness continues... If I make the template blank, it only fires once. But if there is any content (even just a '.'), the afterRender fires twice. No here's the strange part.. once is BEFORE the content appears on the page, the second is after....</p>