Memoize table_ids before iterating through orphaned metadata records
Merge remote-tracking branch 'origin/CDB-1260' into release/2.7.0