test for lateral and TableNamesFinder