Fix #971: FilteredQuery not properly handling conditionless query or filter