Critical changes to badge-generating block in the summaryView, recursive template. See comments.