We were treating legislation proposals as if they were proposals, omitting the "legislation" namespace, and so we were flagging/unflagging proposals when we wanted to flag/unflag a legislation proposal.