nonce_gen_counter does not declassify the pubkey it copies from the keypair, though nonce_gen_internal loads it with pubkey_load, which ARG_CHECKs it, and serializes it. keypair_load declassifies the same data for the same reason. Declassify the copy here too.
ctime_tests passed a keypair that was never marked as secret, so it could not see this. It now marks the keypair as undefined before the call. Without the declassify, ctime_tests under valgrind reports 3 errors. With it, it reports none.