Fixes #303

https://github.com/couchbase/couchbase-lite-android/issues/303#issuecomment-42908814