Revert "Revert "Fix a11y cache correctness bug""

This reverts commit 4d70022b8841a17850dcb9d670f23b3ab6f3bb93.
This is so certain tests start passing again. The revert was a low risk
measure for the security update.
We still need to address the crash that this introduces

Test: It builds
2 files changed