fix Issue 9415 - delegate inference should make function literal impure