fix Issue 10005 - struct variable declaration and const-correctness