Flag upserts as persisted.

[ fix #3159 ]