Fix memory leak in XPath filter optimizations Namespace nodes must be freed when selecting the first or last element of a node set. Found with libFuzzer and ASan.