Fixes #282.
Merge pull request #283 from couchbaselabs/issue-282

Fixes #282.