What happens when extending an extended template?
So I tried it, made three files, one extending the first, and another extending the second, and it all worked more or less as one would expect.

bozo.html

&lt;!DOCTYPE HTML&gt;
&lt;html&gt;
  &lt;head&gt;
    {% set title = title ~ 'Main' %}
    &lt;title&gt;{{ title }}&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
    Where was {% block whereWasBozo %}Bozo?{% endblock whereWasBozo %}&lt;br&gt;
    Variable A is {{ a }}
  &lt;/body&gt;
&lt;/html&gt;


ex1_bozo.html

{% extends 'bozo.html' %}
{% set title = title ~ 'Bozo 1 = ' %}
{% set a = 'ex1' %}
{% block whereWasBozo %}
  Bozo wasn't here. 
{% endblock whereWasBozo %}


ex2_bozo.html

{% extends 'ex1_bozo.html' %}
{% set title = 'Bozo 2 + ' %}
{% set a = 'ex2' %}
{% block whereWasBozo %}
Bozo was in Bozoland.
{% endblock %}


When I pulled up page ex2_bozo.html, the end result was the page title said: 

Bozo 2 + Bozo 1 = Main


and the web page said:

Where was Bozo was in Bozoland.
Variable A is ex1


So the blocks extend all the way through. The variables are first set in the file you initially call. They are modified in the middle 'extension' and modified again in the final extension.