Investigate and fix broadcast message dismissal cookie not restoring upon login

Summary

Dismissed cookie does not stay dismissed when user logout and log back in.

Steps to reproduce

Create a dismissible broadcast message with path requirements as admin, dismiss the message. Logout and log back in.

Root cause

When restoring cookies, not all valid dismissals were retrieved: #472290 (comment 2017725757)

Edited by Roy Liu