Fix another generics bug with default methods. Closes #7295.