Fixes #4640: Changing security policies now trigger a promise generation