Issue #22564:correctly handle restricted items
Merge pull request #278 from garyhgohoos/22564

Issue #22564:correctly handle restricted items