After putting this line in the template:
<tiles:getAsString name="subtitle" ignore="true"/>
<tiles:insertAttribute name="body" />
And if "subtitle" attribute is not defined. The page will fail on rendering the "body" attribute, because getAsString failed to cleanup it's tiles context (endContext() is not executed).
The problem is in GetAsStringModel class, in the last method - renderAttribute():
The first three lines that check for null attribute and ignore flag should be inside the try caluse:
if (attribute == null && ignore)
This way the finally clause will be executed even in attribute is null and should be ignored. The finally clause is ending the tiles context.
This is the same as the code inside: InsertAttributeModel.renderAttribute()