Fixed a case where a view query could use -1 instead of the view_id in the SQL query

https://groups.google.com/d/msgid/mobile-couchbase/aa81a906-188f-445f-b67c-3898503e3683%40googlegroups.com