Fix saving record using #update_attributes

Change-Id: I8e775dead0a610ff610aa66834524cb661339596
Reviewed-on: http://review.couchbase.org/41273
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Tested-by: Sergey Avseyev <sergey.avseyev@gmail.com>