With order_inserts == true a commit during a transaction can cause constraint violation. A Simple test case is attached.