Fixing serious bug in cache-table creation script.

This bug was introduced by me in dc53fa7be33f3052e39952112679c7b0e0b3b324