--- checkout.module.orig	2008-08-07 11:18:30.000000000 +0200
+++ checkout.module	2008-08-07 11:18:38.000000000 +0200
@@ -39,7 +39,12 @@
 function checkout_init() {
   global $user;
   if ($user->uid && user_access('check out documents')) {
-    checkout_handle_request($user->uid);
+    // Avoid AJAX requests unlocking a node. This header is set when doing
+    // XMLHttpRequests through jQuery. Modules using Ajax without jQuery
+    // can still set this header when using a XMLHttpRequest for their queries.
+    if ($_SERVER['HTTP_X_REQUESTED_WITH'] != 'XMLHttpRequest') {
+      checkout_handle_request($user->uid);
+    }
   }
 }
 
