Add a couple of function to deal with dangling modules.

Dangling modules are those that are found in the database's registry but
are not found in the source code.