Issue 12524 - wrong type with inout const arg and inout return

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