Bug 1631 Table has no column error

Do review
https://gist.github.com/gruber86/a4f037efb36403ce32c9