This fixes #7929.  It now uses the input tables correctly.