add test and fix ReaderAndLiveDocs.reopenReader bug