fix equals in KeyValDocument
fix tests, for now.