Revert "P2SH invalidation fix *Critical*"

This reverts commit 96b8f6fe0d612ba1c856a5c6a65afa319e0bedb7.
P2SH invalidation fix **critical**

Apply a similar fix, but with a broader scope:

https://github.com/faizkhan00/mastercoin-tools/commit/96b8f6fe0d612ba1c856a5c6a65afa319e0bedb7