As I wrote in rP23808, function getBaseTemplateName and its usage is wrong.
Reason is, that it makes structure tree to use parent template and displays then incorrect information.
I believe motivation was to not load unnecessary templates but there are too many variables which could differ and therefore it would display wrong information (e.g. woman trained from house).