title: Wagtail/Django block doesn't render content properly from custom/nested StructBlock template
body: <p>I have a block in the head of my base template that will render "extra" CSS. This CSS will be customized from fields coming in from a Wagtail CMS instance.</p>
  
  <p>So, in the <code>base.html</code> template I have:</p>
  
  <pre><code>&lt;head&gt;
    {% block extra_css %}{% endblock %}
  &lt;/head&gt;
  &lt;body&gt;
    {% block content %}{% endblock %}
  &lt;/body&gt;
  </code></pre>
  
  <p>Then, in my <code>detail.html</code> template, which extends off of the base, I have:</p>
  
  <pre><code>{% block content %}
    {% for block in page.body %}
      {{ block }}
    {% endfor %}
  {% endblock %}
  </code></pre>
  
  <p><code>body</code> is a <code>StreamField</code> in Wagtail. One of said fields is a custom <code>StructBlock</code>, the model of which is set up like so:</p>
  
  <pre><code>class CalloutBlock(blocks.StructBlock):
      accent_color = blocks.CharBlock(required=False, label='Accent Color', help_text='HEX Value/Color')
      class Meta:
          template = 'inc/blocks/callout.inc.tpl'
  </code></pre>
  
  <p>Finally, in that <code>callout.inc.tpl</code> template, I am attempting to render a <code>&lt;style&gt;</code> tag that <em>should</em> get injected in my <code>extra_css</code> block:</p>
  
  <pre><code>{% block extra_css %}
    &lt;style&gt;
      .accent_color {
        background-color: {{accent_color}} !important;
      }
    &lt;/style&gt;
  {% endblock %}
  </code></pre>
  
  <p>However, this block is not injected into the <code>&lt;head&gt;</code> as I'd expected. Instead, it renders in the body, like so, as if the <code>{% block extra_css %}</code> tag were not there at all:</p>
  
  <pre><code>&lt;head&gt;
  &lt;/head&gt;
  &lt;body&gt;
    &lt;style&gt;
      .accent_color {
        background-color: {{accent_color}} !important;
      }
    &lt;/style&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p>Is simply a limitation in Django templates? Is nesting the issue? Or is it because I'm using a custom template at the model level, and that's somehow outside the scope of the parent template parsing?</p>
  
  <p>Django: 1.10<br>
  Wagtail: 1.6</p>