Motivated by https://github.com/lightningdevkit/rust-lightning/pull/2605#discussion_r1341709819. This is something we could do in preparation for taproot to avoid things like #2605 and #2606 from happening again (aside from proper test coverage).