Fixed #15697 -- Made sqlindexes aware of auto-created tables

Thanks mbertheau for the report and Ash Christopher for the
initial patch.