public void setOverlay(OverlayAddressSpace spc) throws AddressFormatException {
		AddressSpace underlie;
		if (overlay != null) {
			underlie = overlay.getOverlayedSpace();
			spaces[underlie.getUnique()] = underlie;
			overlay = null;
		}
		underlie = spc.getOverlayedSpace();
		if (underlie.getUnique() == 0 || underlie.getUnique() >= spaces.length) {
			throw new AddressFormatException("Cannot set overlay over " + underlie.getName());
		}
		spaces[underlie.getUnique()] = spc;
		overlay = spc;
	}
Alter address space decoding for a specific overlay space.
Any decoded space that matches the overlayed space is replaced with the overlay itself.
This causes addresses in the overlayed space to be converted into overlay addresses.
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/pcode/PackedDecodeOverlay.java