Fix a bug where TypeParameterMatcher does not detect the case where the type parameter is derived from an outer class

- Fixes #1153