Add test for multiple dispatch on closures and fix this case