assert was checking size wrongly. script code has min 4 ops, not the input script itself.