Fix SQL error with empty database

Call to api/browse/new fails with sqlalchemy.exc.DataError: OFFSET cannot be negative