Fix a possible stack overflow in getWordsTilSig