In a fresh SLIME instance, the following sequence of commands will leave the REPL in the CL-USER package, rather than the FOO package:
,change-package foo ,push-package bar ,pop-package
This is because the bottom of the package stack is always the initial package in which SLIME starts up; the first ,PUSH-PACKAGE doesn't save the current package, but rather pushes the *new* package onto the stack, so FOO is forgotten. I'd expect that the package stack would be a stack of the packages that were current before ,PUSH-PACKAGE commands; is there a reason that it is not so? (The same goes for the directory stack.)
If not, I've put a reimplementation of the relevant functions and REPL shortcuts at http://paste.lisp.org/display/22487 with the behaviour that I expected (and a couple other folks too).