AI assistance: Codex reproduced the issue, implemented the fix, and ran the validation described in the pull request.