Fix table detection
Merge pull request #972 from nlegoff/upgrade-fix

[3.9] Fix table detection