couchdb: fix rereduce in by_project view