The following module is missing from the file system

As you know, Drupal 7.50 introduced the above message for the respective errors that it detects. Drupal provides a page that deals with the problem, namely

I had to deal with this problem, and although I disabled and un-uninstall the offending module, I run the sql query (drush sql-query "DELETE from system where name = '%old_module1%' AND type = 'module';"), and, in general checked everything that I had to check, the problem persisted.

The last thing left to do, was to search for calls to the specific module, according to the last paragraph entitled "There is a bug in a module installed on your site". There, references are made to functions like "module_load_include()", "drupal_get_path()", "drupal_get_filename()".

The result of the following grep search was enough in my case:

grep -irn "drupal_get.\+module_name.\+;"