try to improve error messages when overriding extension method or static

Fixes #274