Avoid infinite loop when retrieving revisions