Tweak table() api. Closes #2262