Replace the reference to the non-existent $_module_pages name to something that seems to be what is actually being used, although it is still not clear how this actually works. Need to continue to trace mods/_core/modules/classes/Module.class.php