It should be impossible to add new entities like ChangeMessages for
patch sets that don't exist, but code bugs in REST API handlers or the
NoteDb rebuilding code might result in these showing up in the NoteDb
graph. Be more resilient to such corrupt graphs.
Change-Id: I0916ff0715d50292f2485cb8455286f50a2b479d