fix inner_script in Script#pay_to_script_hash
invalidate script when casting fails due to empty stack