Fix mass deletion quirks, including test failing due to unicode issues.

okay. can you explain the SQL query to me? I don't follow.