Tests and code fixes for index_is_newer