updated access to the $tables array to point to Base_module_model which will have a more accurate list of loaded tables