I believe that gavelkind should be edited in such a way that if, for example, a king has two kingdom titles and dies, his lands would be split more fairly my issue is that the second son only gets titles in his dejure kingdom, while, the first gets the remainder of the titles. Instead, the game should check if the kingdoms are in the same empire, and if they aren't the second son should get all the land in his dejure empire.
For example, in 867 the land is overrun with karlings. If the king of Italy somehow dies and his lands are inherited by the king of burgundy, then both titles are on gavelkind. When the new king of Itandy or Burgaly dies, his first son gets all of burgundy, and the second son Italy, but because in 867 Italy owns two dejure kingdoms - the Papal states and Italy, instead of the second son getting the entire Italian territory, he only gets what is dejure "Italy". Thus the king of Burgundy now for some reason unreasitically owns the papal states. This exact scenario happened in my game, and it seriously annoys me that Burgundy is about to absorb some parts of Sicily due to dejure drift.
For example, in 867 the land is overrun with karlings. If the king of Italy somehow dies and his lands are inherited by the king of burgundy, then both titles are on gavelkind. When the new king of Itandy or Burgaly dies, his first son gets all of burgundy, and the second son Italy, but because in 867 Italy owns two dejure kingdoms - the Papal states and Italy, instead of the second son getting the entire Italian territory, he only gets what is dejure "Italy". Thus the king of Burgundy now for some reason unreasitically owns the papal states. This exact scenario happened in my game, and it seriously annoys me that Burgundy is about to absorb some parts of Sicily due to dejure drift.