Fix table(). Closes #2276