Disparity between Mock and Real for grouped reduced views

When using a reduced view, and testing with the mock, there is a discrepancy between what the mock does, and what the real server does.

Both server and client are latest as of 20mar16.

if we do this:
var query = ViewQuery.from(VersionViews.DESIGN_DOC_NAME, this.designDoc.views.latestVersion.name); query.on_error(ViewQuery.ErrorMode.STOP); query.stale(ViewQuery.Update.BEFORE); query.group(true) query.reduce(false)

the mock will give the expected answer, but the real server will error with:
‘Error: query_parse_error: Invalid URL parameter ‘group’ or ‘group_level’ for non-reduce view.’

If we change to this:
query.reduce(true)

the mock will return a single result (was expecting 501 at least) but the real server will give the expected 501 results.

I have traced it to this line: https://github.com/couchbase/couchnode/blob/master/lib/mock/bucket.js#L1321 with the suspiciously excited comment.

I’m not sure if the error is in the mock, or in the real database, so was hoping someone cleverer could help out here ?

Additionally, setting 'query.reduce(false)orquery.group(false)` is not the same as not setting them at all.
I feel this is unintuitive.