Don't crash when inlining static methods called using callvirt. Fixes #668170.