When multiple groups are selected the conversion from a string to an array of integers doesn't work ─ and so the query ignores all but the first value.
When restricting the filter to only groups of a Parent group, the form has a bug where all possible child groups are selected after submission.