Double-check against database for existence of table

For some reason, PostgreSQL was not seeing variables.tableLookup as being updated with creation of a table. So, add a double-check to look at the database if variables.tableLookup[tablename] exists but is set to false.