instead of recursively locking unconditionally
This is aconcludes backport of [[https://github.com/bitcoin/bitcoin/pull/21055 | core#21055]] [15/1616/16]
https://github.com/bitcoin/bitcoin/pull/21055/commits/e11b6496506246882df450586acf735dabedf731
Depends on D11221