Fix bug where external tables were not being recognized as such.