Make covering check smarter about multiple groups joined together

The target in the query goal needs to be a table source so that it can be distinguished from other occurrences of the same table (see new test). Then it is a matter of checking that this table is one of the tables joined from the scan under consideration.