diff -pruN 7.20251227/debian/changelog 7.20251231/debian/changelog
--- 7.20251227/debian/changelog	2025-12-28 00:40:29.000000000 +0000
+++ 7.20251231/debian/changelog	2025-12-31 16:15:31.000000000 +0000
@@ -1,3 +1,9 @@
+dh-python (7.20251231) unstable; urgency=medium
+
+  * Fix a regression in pybuild in 7.20251227. (Closes: #1124229)
+
+ -- Stefano Rivera <stefanor@debian.org>  Wed, 31 Dec 2025 12:15:31 -0400
+
 dh-python (7.20251227) unstable; urgency=medium
 
   * Refactor internals to use dataclasses.
diff -pruN 7.20251227/pybuild 7.20251231/pybuild
--- 7.20251227/pybuild	2025-12-28 00:40:29.000000000 +0000
+++ 7.20251231/pybuild	2025-12-31 16:15:31.000000000 +0000
@@ -517,7 +517,7 @@ def main(cfg: PybuildOptions) -> None:
                 if key in context_map:
                     c = context_map[key]
                 else:
-                    context.copy()
+                    c = context.copy()
                     c.dir = get_option("dir", i, version, cfg.dir)
                     c.destdir = get_option("destdir", i, version, default_destdir)
                     context_map[key] = c
