Pull request was changed, so I change too.

Use flags again in children,
also port the bugfix where empty arrays from preg_match_all would be accepted