title: Multiple sections in Handlebars template
body: <p>I’m just getting to know Handlebars a bit better as a templating solution and have hit a problem that I don’t know how to solve.
  I’ve added sections to my layout, one for the header and one for the footer for dynamically inserting scripts from my views. However, only the first section ever renders. The second one (regardless of order) is always omitted.</p>
  
  <p>My layout is a simple HTML page:</p>
  
  <pre><code>&lt;!doctype html&gt;
  &lt;html&gt;
  &lt;head&gt;
      &lt;title&gt;Test site&lt;/title&gt;
      {{{_sections.head}}}
  &lt;/head&gt;
  &lt;body&gt;
      &lt;header&gt;
          //Logo and stuff here
      &lt;/header&gt;
      {{{body}}}
  
  
  
  
      &lt;script src="//code.jquery.com/jquery-2.0.2.min.js"&gt;&lt;/script&gt;
      {{{_sections.footer}}}
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>And in my layout file I have:</p>
  
  <pre><code>{{#section 'head'}}
  &lt;script src="//cdnjs.cloudflare.com/ajax/libs/handlebars.js/1.3.0/handlebars.min.js"&gt;&lt;/script&gt;
  {{/section}}
  
  //basic HTML here
  
  {{#section ‘footer’}}
  &lt;script&gt;
  alert(“this doesn’t fire if its second!”);
  &lt;/script&gt;
  {{/section}}
  </code></pre>
  
  <p>The header section appears on the page but the footer does not. The thing is, if I put the footer at the top of the page (i.e. before the {{section ‘head’}} that then renders but the head section no longer renders.</p>
  
  <p>In my app.js I’m setting up the section functionality as follows:</p>
  
  <pre><code>var handlebars = require('express3-handlebars')
      .create({
          defaultLayout: 'main',
          helpers: {
              section: function (name, options) {
                  if (!this._sections) {
                      this._sections = {};
                      this._sections[name] = options.fn(this);
                      return null;
                  }
              }
          }
      });
  app.engine('handlebars', handlebars.engine);
  app.set('view engine', 'handlebars');
  </code></pre>
  
  <p>Any ideas what I’m doing wrong here or how to add support for both sections?</p>
  
  <p>Thanks</p>