Add an arbitrary limit on the maximum size of the frame table, so that we don't crash. Fixes bug 6669.