make sure cached table name is a string. fixes #12582