Your code works fine, for me.
(when (member last-command (list 'foo 'bar 'bob 'baz)) (do-something))
First, last-command is typically a symbol, not a string. There is no reason to use string-equal for two symbols. It works, but it is slower - it just converts the symbols to strings and then compares those strings.
The best way to compare two symbols ...