private RegisterValue getRegisterValue(Register register, Address address,
			Map<Register, RegisterValueStore> map) {

		/** if the address is in an overlay and we are getting the default value, then get the default
		 * value from the base space, not the overlay space.
		 */
		if (map == defaultRegisterValueMap && address.getAddressSpace().isOverlaySpace()) {
			address =
				((OverlayAddressSpace) address.getAddressSpace()).translateAddress(address, true);
		}

		RegisterValueStore store = map.get(register.getBaseRegister());
		if (store == null || store.isEmpty()) {
			return null;
		}

		return store.getValue(register, address);
	}
Flush any cached context not yet written to database
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/util/AbstractStoredProgramContext.java