Add guards for the non-content-deterministic upsert