Actually, (Undo/Redo) Ctrl+Z doesn't change layers. (History Step Back) Ctrl+Alt+Z selects the previous edited layer. I've gotten into the habit of hitting Ctrl+Z then if I need to undo more I'll use Ctrl+Alt+Z. But just for single undos Ctrl+Z will keep your layer selected.
Ah, just figured out it only happens when using Ctrl + Alt to undo, man I'm going to have to train myself to undo with Ctrl + z but that only allows for one undo. What a lame workaround, anyone know how to turn this off for the multiple undo?
I think it typically happens when people bind History Step Back to Ctrl-z instead of Undo, because it doesn't happen with the default undo. There was a script Will Fuller wrote that got around this issue. Run it, bind it and forget it ever was an issue. http://www.polycount.com/forum/showthread.php?t=78932