I'm not entirely sure if this is a bug or not, but in any case:
If a holy order gain a lot of land from, for example a crusade, they'll create custom kingdoms. These custom kingdoms do not inherit the laws of the holy order (Agnatic Open Elective) but instead become Gavelkind.
So, depending on design intent the issue here is one of these two:
1. Holy orders can create custom kingdoms.
2. Holy order custom kingdoms do not inherit the holy order succession laws.
If a holy order gain a lot of land from, for example a crusade, they'll create custom kingdoms. These custom kingdoms do not inherit the laws of the holy order (Agnatic Open Elective) but instead become Gavelkind.
So, depending on design intent the issue here is one of these two:
1. Holy orders can create custom kingdoms.
2. Holy order custom kingdoms do not inherit the holy order succession laws.