fix issue 9859 - Cannot use inout in delegate
Merge pull request #2399 from hpohl/9859

fix issue 9859 - Cannot use inout in delegate