Pass an interface instead of a pointer to an interface to the XPathFunction; also reverse the order of arguments before calling the function