FamilyActivityPicker is not picking the right group of apps.

I am passing a group of apps that the user did not select to the ManagedSettingsStore. I write it like this I then block the user from using this group of apps.

ManagedSettingsStore().shield.applicationCategories = ShieldSettings.ActivityCategoryPolicy.all(except:familyActivitySelection.applicationTokens)

This problem occurs when you select three or more categories in the FamilyActivityPicker. For example, if you select only the Education category, only the apps in the Education category will be available, but if you add the Productivity/Lifestyle category to the selected categories, all apps in the iPhone will be available. This problem occurs whether the number of categories to select is four or five. Perhaps IOS is not generating the exact set of apps when it generates the set.