output: Make table dimension functions work in arbitrary contexts.