It turns out that we aren't really using these. The identity logic is sufficient. Also, add some asserts for a crash I had once but couldn't reproduce, in case that helps catch it next time.