--- checkout.module.orig	2008-08-06 12:22:14.000000000 +0200
+++ checkout.module	2008-08-06 12:26:49.000000000 +0200
@@ -39,7 +39,13 @@
 function checkout_init() {
   global $user;
   if ($user->uid && user_access('check out documents')) {
-    checkout_handle_request($user->uid);
+    // The webfm module causes repeated execution of hook_init because it
+    // uses a URL "http://.../webfm_js" for page callbacks to build
+    // the file tree etc. Calling checkout_handle_request with webfm_js
+    // as current URL would unlock a just locked file on the edit form.
+    if ($_GET['q'] != 'webfm_js') {
+      checkout_handle_request($user->uid);
+    }
   }
 }
 
