Simplest change is
<xsl:for-each select="*[contains(@class,' topic/topic ')][last()]">
but you could also collapse this into the value-of, i.e.
<fo:block>
<xsl:value-of select="*[contains(@class,' topic/topic ')][last()]/*[contains(@class,' topic/title ')]"/>
</fo:block>
Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference