fix for empty NOT IN () in WHERE clause