A bunch of cleanups and bugfixes with various skm/locked/unlocked cases

Trying to make more sense of this, but it's a pretty cryptic system with lots of weird states.
I think we've solved some different bugs, but not 100% certain.
Fix bugs with various arrangement of secret keys
reverse and output the gnu dummy extension