differentiate between encode_assigns and encode_clause, fix update regression