This is a bug. You may encounter unexpected behavior upon succession, such as the law reverting to Imperial Elective automatically.
Some code (please tell me what kind of event or decision you took so "he thought I should pay for my expansion by dividing all my titles among all my heirs" actually came up so it can be fixed -- it's definitely not an EMF/HIP event, so is it vanilla?) is forcing Gavelkind here, making the false assumption that everybody that's a Catholic qualifies for Gavelkind and apparently not checking the succession law potential first (i.e., it's definitely pre-HF code but maybe even older than HL when they gave us easy conditions for checking law requirements in script).