I agree, something more is going on. I found this from a couple years ago which probably explains it:
In other words, I think
@set a[i].s = 1is interpreted as : “give me a copy ofain which thexfield of thei-th element is set to 1”. As opposed to “give me a copy ofa[i]in which thexfield is set to 1” (which would be the desired semantics here).
Container of mutable structs without 100x slowdown? - #5 by ffevotte
It looks like a proposed fix was rejected?