After many red herrings I think the race between checking a message and shutdown is the true cause of the matrix.cfa bug and should be fixed