Don't resolve paths to non-static methods

Fixes #6698