Check for table existence before create

Fixes bug 1271529