Can you add the reverse of this test too? Where you do the DELETE first followed by the UPSERT. In this case, the UPSERT should win because it was last.

We appreciate the fix - thanks for contributing.