Revert aa66a3eb99f88d911071c6cfe1bf60f2584d8f5a
Add tests for empty result sets