If there are no knights in the stack, then as a general rule the leader of whichever unit you last dropped into the stack will be that stack's commander
I've seen this too, but it's only temporary - if you move focus to another stack then back again (or do a "merge" command on the stack) you'll find the general has changed back to whatever the usual precedence would be.