The fix is to ensure the filter for id type is run when displaying assets from an Asset Library.
In the current implementation the id_type filter does not run if a blend file is opened that also happens to be in an Asset Library directory. If we have opened a blend file that is in an Asset Library directory, we use the same is_filtered_id_type() check that is used when filtering assets for "Current File".
How Has This Been Tested?
In Edit > Preferences > FIle Paths, set a directory for "User Library" at the bottom.
Drop the blend file attached in the ticket into the directory set for User Library.
Open a new blend file. Navigate to the Asset Browser and select User Library from the dropdown. Ensure that the filter options correctly hide/show the objects and materials in the library.
Open the blend file that was added to the User Library directly from the User Library directory. Navigate to the Asset Browser and select User Library from the dropdown. Ensure that the filter options correctly hide/show the objects and materials in the library.
Duplicate the blend file in the User Library directory. Repeat the two tests above and ensure that all materials and objects are correctly hidden/shown by the filter options.