Fix some tests
Fix table detection for fields in WHERE statement when only one table is involved in the query