This allows the caller to not provide a default at all and just check
inside the optional to see if the arg was set or not.
This is a partial backport of [[https://github.com/bitcoin/bitcoin/pull/25290 | core#25290]]
https://github.com/bitcoin/bitcoin/pull/25290/commits/fc02f77ca604f0221171bfde3059b34f5d0fb1cd