Refine the fix adding commit 962936370a so that items with a group are correctly checked. Fixes gh-42068