[REG2.066] Issue 13640 - can break immutability with inout

https://issues.dlang.org/show_bug.cgi?id=13640