Fix bugs so that docsim-compare works with a keymap