I noticed I would assign a leader as a Corps commander but it would actually assign another leader.
This is what I had in my stack:
2 star leader
2 star leader assigned as a divisional commander
1 star leader assigned as a divisional commander
I selected the 2 star leader and made him Corps commander. However, the tooltip indicated that the the 2 Corps belonged to the other 2 star leader, the divisional commander (so in effect he was leading the Corps and the division at the same time).
I then removed the 2 star leader from the stack, made him a Corps leader, then moved in the 1 star divisional leader. All fine. But as soon as I merged the 2 star divisional commander into the Corps, he took it over.
I'm not sure which guy had more seniority as I don't have a save game but that could be it.