Fix undefined index notices on sql_views_as_tables