Recurse over bases when looking for a method. Fixes db074c4e. (ROOT-5738)