Also, having to specify the same key to a function after having already specified it as "key" to the relation is represents a case where the library is causing the developer using the library to deal with a non-ideal interface due to a lack of support in the library.

The function that you provided might solve the problem, but that doesn't mean that it solves it well. Why duplicate the key when it is already in that configuration? We know that this function was designed to work with some kind of relation - so, it would seem intuitive that it would be passed a reference to the relation it's actually working to provide data to.