Pass around table_ids when registering ghost tables