Comparing pid instead of handles in GetModules_internal (#3575)