Fix JSON missing lumi function

It was broken due to improper testing and old couchdb version.

Fixes #4338