fix bug where newly added tables were not being added in "replace" mode

http://manage.dimagi.com/default.asp?116123