Well, I was led to believe that Stockpile's case was different from the move description, because it says "increasing its defense and special defense by one (1) stage each for the rest of the match, or until Swallow or Spit Up are used". But having looked at Cosmic Power, which has the same energy cost, it does seem odd that one set of boosts should expire, but the other set shouldn't.