You could define the 4 headers as such
<definition name="Members" extends="baseLayout">
<put-attribute name="headerA" value="/headerA.jsp"/>
<put-attribute name="headerB" value="/headerB.jsp"/>
<put-attribute name="headerC" value="/headerC.jsp"/>
<put-attribute name="headerD" value="/headerD.jsp"/>
<put-attribute name="body" value="/gbody.jsp"/>
</definition>
and then in the base layout have some code that says
<c:if test="${memberA}">
<tiles:insert attribute="headerA"/>
</c:if>
etc...