Improving error messages when using lambda expressions and method references