[sanitizer] Fixed a bug in GetListOfModules.