Improve robustness of DER recoding code
Improve robustness of DER recoding code

Bitcoinsulting/multigateway-v2,Bitcoinsulting/multigateway-v2,mezzovide/btcd,mezzovide/btcd,Bitcoinsulting/multigateway-v2,mezzovide/btcd,mezzovide/btcd,mezzovide/btcd,Bitcoinsulting/multigateway-v2,mezzovide/btcd,mezzovide/btcd,Bitcoinsulting/multigateway-v2,Bitcoinsulting/multigateway-v2,Bitcoinsulting/multigateway-v2,Bitcoinsulting/multigateway-v2,mezzovide/btcd,Bitcoinsulting/multigateway-v2,mezzovide/btcd