XPATH: Minor refactoring + preliminary limit on roundtrip tests.