The query produces:
[Index column size too large. The maximum column size is 767 bytes.]
Including ROW_FORMAT=DYNAMIC in the query fixes the issue. We need to figure out whether this is safe to introduce in all queries, or whether it should be conditionally appended to the query.