Fix another corner case for table name extraction in nested sql.