TestHistoryAfterDocDeletion for issue 177 & 178