ipsec: fix a logic error in key_do_getnewspi
(cherry picked from commit 509f1a0f405daf0e2bdaa5b366d21b77052149c3)