Fix c.upsert with no callback from the client

Fixes #2413.