The behaviour here is intended behaviour for a number of reasons, one of the obvious being to shut off simply granting all your lands to your heir prior to death thus rendering gavelkind a meaningless concept.
I did look at your save and it does indeed appear WAD. As giving your brother a bunch of titles will make you the heir of Stettin instead (if his titles total "value" is higher than yours).
Doesn't really matter. It's been balanced that way so you can't give all your titles to your primary heir just before you die. Effectively ignoring Gavelkind.
Look, guys, I understand where you are coming from, but you're sticking very closely to the hard line of not ignoring gavelkind — not allowing gavelkind to be circumvented
at all costs.
I would like to turn the table around — what about not ignoring the fact that:
1. In the first case
only one of the parents (the countess) had gavelkind, the larger realm (kingdom) was Agnatic Primo.
2. In the second case it was simply a landed person — I repeat:
not by inheritance, and he was also not the heir of the grantor (he was a nephew, where the king had sons and grandsons, the new didn't stand to inherit anyway).
Specifically:
Doesn't really matter. It's been balanced that way so you can't give all your titles to your primary heir just before you die. Effectively ignoring Gavelkind.
The young guy Sedzimir (the new count of Marienburg) was the heir of Prince Wit (the Count of Stettin, Sedzimir's father), but he was not the heir of King Zbigniew (an uncle) or especially King Malowuj (a mere cousin). Prince/Count Wit did not grant anything to anybody.
Regarding the balancing rationale (as I feel you're discussing why this is desirable/acceptable rather than strictly
intended, so here are some arguments based on this assumption):
I would like to stress that this looks like High Crown Authority for Pomerania (which is on Autonomous Vassals) (where I feel that the difference between having and not having the advanced protection of High Crown Authority for your realm's integrity should not be circumvented by quirks in a very basic/primitive succession law / HCA is something you need to earn by several generations of rulers changing laws and facing penalties for that), and it could theoretically be intentionally abused in order to mess with people's inheritance (though the gain from doing so would normally be slim/unclear, but you could effectively e.g. retain the best advisors or commanders — look at the genius Sedzimir's martial stat) or at least cause some weird behaviour with all sorts of grantees who are in a succession line somewhere. Again, the proverbial stick has two ends — this can be used to steal exceptional councillors/commanders by not allowing them to inherit a title on the outside and go outside your control. Sacrificing a barony is often worth this, and a county often too. The third problem being the unpredictability.
Does this change anything?