Credit to @ave in the comments above.
In my case, I had to explicitly set up the index and item bits of the foreach
<foreach collection="accountUsers" index="index" item="item" separator=",">
(#{index, javaType=com.my.company.dataid.account.AccountNumber},
#{item.userId},
#{item.role},
And then List<Pair<X,Y>>> works.