i propose to add a test for

    /a/node[2]/node[1]
    /a/node[2]

that would be the situation i was afraid could pose a problem, though i think the current regexp would not stumble over it.