Add regression test for #370
Prevent XPath from returning the same node multiple times (fixes #370)
Merge pull request #417 from sharwell/fix-370

Fix 370