public void reconcile() {
		if (addrFactory == null) {
			return;
		}

		HashMap<String, OverlayAddressSpace> remapSpaces =
			new HashMap<String, OverlayAddressSpace>();

		Iterator<String> iter = spaceMap.keySet().iterator();
		while (iter.hasNext()) {
			String key = iter.next();
			AddressSpace space = spaceMap.get(key);
			if (space instanceof ObsoleteOverlaySpace) {
				// check for restored space
				OverlayAddressSpace oldOverlaySpace =
					((ObsoleteOverlaySpace) space).getOriginalSpace();
				AddressSpace curSpace = addrFactory.getAddressSpace(oldOverlaySpace.getName());
				if (curSpace != null && curSpace.equals(oldOverlaySpace)) {
					remapSpaces.put(space.getName(), (OverlayAddressSpace) curSpace);
					iter.remove();
				}
			}
			else if (space instanceof OverlayAddressSpace) {
				// check for removed space
				AddressSpace curSpace = addrFactory.getAddressSpace(space.getName());
				if (curSpace == null || !curSpace.equals(space)) {
					ObsoleteOverlaySpace obsoleteSpace =
						new ObsoleteOverlaySpace((OverlayAddressSpace) space);
					remapSpaces.put(space.getName(), obsoleteSpace);
					iter.remove();
				}
			}
		}

		for (AddressSpace space : remapSpaces.values()) {
			spaceMap.put(space.getName(), space);
		}

		for (int i = 0; i < baseAddrs.length; i++) {
			Address addr = baseAddrs[i];
			AddressSpace space = addr.getAddressSpace();
			OverlayAddressSpace curSpace = remapSpaces.get(space.getName());
			if (curSpace != null) {
				baseAddrs[i] = curSpace.getAddressInThisSpaceOnly(addr.getOffset());
			}
		}

		init();
	}
Reconcile address space changes using associated address factory.
This method should be invoked following an undo/redo (if the
associated address factory may have changed) or removal of an
overlay memory block.
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/address/AddressMapImpl.java