test: fix coinbases built on arbitrary parents

bitcoin/bitcoin: PR #36109

The review is inconclusive; no findings were published.

Coverage details