Use replacement document for upserts with no modifiers (#741)

See #741.