Fix stash-pop generated error

I tested this before a stash but failed to retest it after a stash pop.
Sigh.