Source code is
gpg_error_t err;
...
if (sig->version >= 4)
{
build_sig_subpkt_from_sig (sig, pk);
mk_notation_policy_etc (sig, NULL, pk);
if (opt.flags.include_key_block && IS_SIG (sig))
err = mk_sig_subpkt_key_block (ctrl, sig, pk);
else
err = 0;
}...
if (!err) err = do_sign (ctrl, pk, sig, md, hash_for (pk), cache_nonce, 0);
So if version < 3, it is reading rubbish off the stack.
Side issue: "nonce" is British English for a paedophile. Perhaps you
don't want such terms in the source code.