prepare TABLE_LIST in a loop and just before opening don't store TABLE_LIST inside Grant_table_base.
Attach a file by drag & drop or click to upload