In addition to the original commit, I had to add `from .script import OP_1`, which was skipped in our backport of PR11796 (D5750)
Partial backport of [[https://github.com/bitcoin/bitcoin/pull/16363 | PR16363]]
Commit 77770d95e2838d7665fa8f621e9e83d79f9b3196