public TraceThread assertMyThread(TraceThread thread) {
		if (!(thread instanceof DBTraceObjectThread dbThread)) {
			throw new AssertionError("Thread " + thread + " is not an object in this trace");
		}
		if (!checkMyObject(dbThread.getObject())) {
			throw new AssertionError("Thread " + thread + " is not an object in this trace");
		}
		return dbThread;
	}
NB. An object in one of these queries had to have an edge. Deleting that object will also
delete referring edges, so the cache will get invalidated. No need to repeat in
doDeleteObject.
Ghidra/Debug/Framework-TraceModeling/src/main/java/ghidra/trace/database/target/DBTraceObjectManager.java