The first case is not a bug, though the rule is a bit obscure. Here's what happens:
You have Agnatic-Cognatic succession, which means Male Preference. When your younger daughter gets a son, your older daughters are bypassed in the line of succession because they have not yet produced any sons. I.e. the system wants the son of your daughter Pereyaslava to become king eventually.
The second case is not a bug either. You have a regular marriage, not a matrilineal one, which means that your son is not of your dynasty, which means Game Over should he inherit.
You have Agnatic-Cognatic succession, which means Male Preference. When your younger daughter gets a son, your older daughters are bypassed in the line of succession because they have not yet produced any sons. I.e. the system wants the son of your daughter Pereyaslava to become king eventually.
The second case is not a bug either. You have a regular marriage, not a matrilineal one, which means that your son is not of your dynasty, which means Game Over should he inherit.