(pouchdb/pouchdb#1936) - more readable inclusive_end computation