fix Issue 10288 - Direct lambda call and purity inference bug