Recreated from #11749 (MumuTW) onto the active release/v3.8.51 — commit cherry-picked with author preserved; regression test + check:lockfile + check-file-size all green on this tip. Thanks for the fix!