[PATCH 1/6] Fix shouldClear for devices with protected descendants. (#902417)