Make last() more xpath conform

Also, * should not select text nodes