Basic support for the XPath last() function.