fix Issue 8998 - 'inout pure' returns immutable, which in reality is mutable