Consistent resolution of Class methods and static methods

Issue: SPR-12502
(cherry picked from commit 9ef0bdc)