v2v: Add bounds check to Xml.xpathobj_node function.

I accidentally called it with an out-of-bounds index, and it caused a
core dump.  Add a bounds check to stop this from happening in
production.