diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectDirectory.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectDirectory.java
index a8d6dda06625fa2c05c7f18c099cc4bdb665f7f9..8f96ef5f067597ce2f2638fbac7affed2a634e79 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectDirectory.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectDirectory.java
@@ -416,10 +416,11 @@ private static Map<String, PackFile> reuseMap(final PackList old) {
 				// This should never occur. It should be impossible for us
 				// to have two pack files with the same name, as all of them
 				// came out of the same directory. If it does, we promised to
-				// close any PackFiles we did not reuse, so close the one we
-				// just evicted out of the reuse map.
+				// close any PackFiles we did not reuse, so close the second,
+				// readers are likely to be actively using the first.
 				//
-				prior.close();
+				forReuse.put(prior.getPackFile().getName(), prior);
+				p.close();
 			}
 		}
 		return forReuse;
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/PackWriter.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/PackWriter.java
index b30e5f7c238f35eb167f80f3a063467f6aad3e0e..0c8210f646b564eb28b67b1bfb7bb8ea2d8eecf7 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/PackWriter.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/PackWriter.java
@@ -718,12 +718,11 @@ private void writeObject(final ObjectToPack otp) throws IOException {
 		final PackedObjectLoader reuse = open(otp);
 		if (reuse != null) {
 			try {
-				if (otp.isDeltaRepresentation()) {
-					writeDeltaObjectReuse(otp, reuse);
-				} else {
+				if (otp.isDeltaRepresentation())
+					writeDeltaObjectHeader(otp, reuse);
+				else
 					writeObjectHeader(otp.getType(), reuse.getSize());
-					reuse.copyRawData(out, buf, windowCursor);
-				}
+				reuse.copyRawData(out, buf, windowCursor);
 			} finally {
 				reuse.endCopyRawData();
 			}
@@ -773,7 +772,7 @@ private void writeWholeObjectDeflate(final ObjectToPack otp)
 		} while (!deflater.finished());
 	}
 
-	private void writeDeltaObjectReuse(final ObjectToPack otp,
+	private void writeDeltaObjectHeader(final ObjectToPack otp,
 			final PackedObjectLoader reuse) throws IOException {
 		if (deltaBaseAsOffset && otp.getDeltaBase() != null) {
 			writeObjectHeader(Constants.OBJ_OFS_DELTA, reuse.getRawSize());
@@ -792,7 +791,6 @@ private void writeDeltaObjectReuse(final ObjectToPack otp,
 			otp.getDeltaBaseId().copyRawTo(buf, 0);
 			out.write(buf, 0, Constants.OBJECT_ID_LENGTH);
 		}
-		reuse.copyRawData(out, buf, windowCursor);
 	}
 
 	private void writeObjectHeader(final int objectType, long dataLength)