Remove now dead code.

This function is not used anymore, as the Query class handles this
functionality.