test for SIGHASH_SINGLE bug

...important caveat: I'm not sure I've implemented this correctly. Further
testing will be required.