findAncestorByHash nulled out 'ancestor' only when the descendant block was also known, due to a 'block &&' guard. If block_hash didn't resolve to a known block, the guard short-circuited and the still-valid ancestor pointer was passed to FillBlock, causing the call to report success for an unknown descendant.
checked the sibling functions findCommonAncestor and findAncestorByHeight for the same short-circuit pattern; both already default to a null result whenever either lookup fails, so no equivalent bug exists there.
Extended the existing interfaces_tests/findAncestorByHash unit test with a regression assertion for an unknown descendant hash. Verified it fails without the fix and passes with it (./build/bin/test_bitcoin --run_test=interfaces_tests/findAncestorByHash).
fixes #36472