Merge "Simplify query for tables_used; no need to count when we only care if there's one." into main