diff --git a/ChangeLog.md b/ChangeLog.md
--- a/ChangeLog.md
+++ b/ChangeLog.md
@@ -1,3 +1,7 @@
+### 0.26.11
+
++ Don't try to guess which callback arguments are `user_data` arguments, as this can lead to problems, as in [issue 447](https://github.com/haskell-gi/haskell-gi/issues/447).
+
 ### 0.26.9
 
 + Add a workaround for a [GHC issue](https://gitlab.haskell.org/ghc/ghc/-/issues/23392) stopping parallel compilation in GHC >= 9.6.
diff --git a/haskell-gi.cabal b/haskell-gi.cabal
--- a/haskell-gi.cabal
+++ b/haskell-gi.cabal
@@ -1,5 +1,5 @@
 name:                haskell-gi
-version:             0.26.10
+version:             0.26.11
 synopsis:            Generate Haskell bindings for GObject Introspection capable libraries
 description:         Generate Haskell bindings for GObject Introspection capable libraries. This includes most notably
                      Gtk+, but many other libraries in the GObject ecosystem provide introspection data too.
diff --git a/lib/Data/GI/CodeGen/Fixups.hs b/lib/Data/GI/CodeGen/Fixups.hs
--- a/lib/Data/GI/CodeGen/Fixups.hs
+++ b/lib/Data/GI/CodeGen/Fixups.hs
@@ -263,9 +263,8 @@
   (n, APICallback (cb {cbCallable = fixCallableUserData (cbCallable cb)}))
 fixCallbackUserData (n, api) = (n, api)
 
--- | If the last argument of a callable is a @gpointer@, and it is not
--- marked as a closure pointing to a different argument, mark it as a
--- callback @user_data@ argument.
+-- | Any argument with a closure index pointing to itself is a
+-- "user_data" type argument.
 fixCallableUserData :: Callable -> Callable
 fixCallableUserData c = c {args = fixLast 0 (args c)}
   where
@@ -273,7 +272,7 @@
     fixLast _ [] = []
     fixLast n (arg:[])
       | argType arg == TBasicType TPtr &&
-        argClosure arg `elem` [-1, n] =
+        argClosure arg == n =
           [arg {argClosure = -1, argCallbackUserData = True}]
       | otherwise = [arg]
     fixLast n (arg:rest) = arg : fixLast (n+1) rest
