Problem/Motivation
In #3376846: Implement the new access policy API we adjusted the permission layer to a point where a role change has consequences. I.e.: Your permissions may change and a few cache entries need to be flushed. This doesn't work neatly in all of our tests because we are not calling refreshVariables(), meaning "outside requests" do not properly flush the cache tags.
Rather than bloat the Access Policy API issue with these fixes, let's commit these fixes separately.