This code:
void main()
{
string s, t;
t = t ~ "1234567";
s = s ~ "1234567";
s ~= s;
assert(s == "12345671234567", s);
assert(t == "1234567", t);
}
asserts when compiled for Win64 because "s ~= s;" overwrites t.
This happens because _d_arrayappendT(const TypeInfo ti, ref byte[] x, byte[] y)
is called with both parameters passed by ref according to the ABI, but no copy is made for y.