Complete issue #116

Port
https://github.com/couchbase/couchbase-lite-java-core/commit/4b063f13a78c461ac5e8dfa57f6bed4563eebabd