Arbitrary static table sizes

note that the PR is based uppon #339. the meat is the last two patches. I'll rebase it as soon as #339 has been merged...
Should use logical `&&`.