[COOK-3453] Ensure that ruby block adding keys is idempotent