Migrated issue, originally created by Michael Bayer (@zzzeek)
easier to illustrate:
<%def name="a()">
% if caller:
${ caller.body() }\
% endif
AAA
${ b() }
</%def>
<%def name="b()">
% if caller:
${ caller.body() }\
% endif
BBB
${ c() }
</%def>
<%def name="c()">
% if caller:
${ caller.body() }\
% endif
CCC
</%def>
<%call expr="a()">
CALL
</%call>
result:
CALL AAA CALL BBB CALL CCC
should be: