Pass query-fn as symbol to make-query-then-exec

Passing query-fn as a function value rather than a symbol to
make-query-then-exec will under certain circumstances lead to an
ExceptionInInitializerError with a cause describing that the respective
function was not defined. It is not clear how to reproduce this
situation but it's cleaner to pass a symbol in this case, anyway.