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.
We get rid of database cleaner, and JavaScript tests are faster because between tests we now rollback transactions instead of truncating the database.