private Address findMaxAddress(ModuleDB module, Address addr) throws IOException {
		Address maxAddr = addr;
		List<DBRecord> list = module.getParentChildRecords();
		for (int i = 0; i < list.size(); i++) {
			DBRecord rec = list.get(i);
			long childID = rec.getLongValue(ParentChildDBAdapter.CHILD_ID_COL);
			Address childMaxAddr = null;
			if (childID < 0) {
				FragmentDB frag = moduleMgr.getFragmentDB(-childID);
				if (!frag.isEmpty()) {
					childMaxAddr = frag.getMaxAddress();
				}
			}
			else {
				ModuleDB m = moduleMgr.getModuleDB(childID);
				childMaxAddr = findMaxAddress(m, addr);
			}
			if (childMaxAddr != null && maxAddr == null) {
				maxAddr = childMaxAddr;
			}
			else if (childMaxAddr != null && childMaxAddr.compareTo(maxAddr) > 0) {
				maxAddr = childMaxAddr;
			}
		}
		return maxAddr;
	}
Use the given list to get the child order and update each record.
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/module/ModuleDB.java