public IN doWork(ChildReference root)
throws DatabaseException {
IN rootIN = (IN) root.fetchTarget(db, null);
rootIN.latch(CacheMode.UNCHANGED);
try {
/* Re-check that all conditions still hold. */
boolean isDirty = rootIN.getDirty();
if (rootIN == target &&
rootIN.isDbRoot() &&